SQL queries parser.

Hello,
I have quite strange question related to my research.
Probabley within Oracle DB there is some dynamic library which is parsing SQL queries,
for example.
SELECT * FROM schema.table which is able to extract informations from SQL listed above that we want to display all columns from selected table.
When this construction is valid ( SQL standard ) the next step is verification the object existence in DB. It means
that there are two separated actions which are analyzing queries.
I need only first part of that process, which will give me informations about all object used in SQL query
is it possible to accomodate that internal parser witin stand alone middleware like Weblogic Event Server ?
I can do it with regular expression patters, but it's not going to be fast and effective for subqueries and all advanced
constructions for DHW like MODEL, etc.
Thank You,
R.

>
http://search.cpan.org/~rehsack/SQL-Statement-1.23/lib/SQL/Statement.pm
BUGS AND LIMITATIONS ^
* currently we treat NULL and '' as the same - eventually fix
* No nested C-style comments allowed as SQL99 says
>
That's the reason why I want to use dedicated for 11g EE library ;-)
Thanks for quick reply

Similar Messages

  • Queries regarding SGA, PGA and parsed SQL Queries

    Hi
    I am new to Oracle server architecture.
    Please correct me if am wrong.
    As per my understanding, the data that we retrieve from a SQL query is stored in SGA in Database buffer cache.
    I have some queries:
    1. Does the database buffer cache store only data from SQL queries or anything else also? What is its size? Can we set the size?
    2. Where are the parsed SQL queries stored - SGA or PGA? And where exactly? I want to know if all the users connected in an Instance have access to each other's parsed SQL queries?
    3. SGA is shared by all users in an Oracle Instance? PGA and UGA are local to a specific user in an instance? Is it correct?
    Thanks
    Abhi

    AB312062 wrote:
    Hi
    I am new to Oracle server architecture.
    Please correct me if am wrong.
    As per my understanding, the data that we retrieve from a SQL query is stored in SGA in Database buffer cache.
    I have some queries:
    1. Does the database buffer cache store only data from SQL queries or anything else also? What is its size? Can we set the size?
    2. Where are the parsed SQL queries stored - SGA or PGA? And where exactly? I want to know if all the users connected in an Instance have access to each other's parsed SQL queries?
    3. SGA is shared by all users in an Oracle Instance? PGA and UGA are local to a specific user in an instance? Is it correct?
    Thanks
    AbhiThe questions you have are all good ones, but require far too much to be explained (properly) in a forum such as this.
    I would highly recommend picking up a book by Tom Kyte and reading through that.
    Cheers,

  • Erratic Report Region Behavior with Dynamic SQL Queries

    I'm running HTMLDB v 1.5.1.00.12 and I've noticed some odd behavior with report regions using dynamic SQL queries. Every so often, our testers will run a page containing a dynamic sql report region and get the following error, (despite the fact the query was working only moments ago and no other developer has touched it):
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    or sometimes
    failed to parse SQL query:ORA-01403: no data found
    The only solution I've found so far is to:
    1) Make a copy of the failed report region.
    2) Disable or delete the original failed report region.
    The new copy of the report region runs without issue.
    My search of the forums turned up the following two threads, but neither provided me with a clear explanation of the cause, and how to avoid it:
    ORA-06502:PL/SQL: numeric or value error: character string buffer too small
    Re: Import Export Error (ORA-06502)
    The columns being returned are below the 4000 character limit, and the rows being returned are far less than 32k in size.
    Could this have anything to do with the way HTMLDB is internally storing the PL/SQL used to generate the dynamic SQL Query? Is there any known issue related to this with that version of HTMLDB?
    This problem occurs without any discernable pattern or consistency, making it hard to determine where I should focus my efforts in tracking down the cause.

    Hi all,
    My report seems to be behaving correctly once i set it to "Use Generic Column Names (parse query at runtime only)" :)
    Cheers,
    Joel

  • A simple DBMS and SQL engine parser

    hi guys;
    i'm about to start an interesting c++ project described below...what i need is that you give me links ,advice and resources that could help me in my project...thanks for helping ...
    here is the description:
    Assignment:
    In a nutshell, this assignment asks you to create a parse-tree for sample test SQL statements and actually create the underlying data structures to hold the data i.e. you are creating an extremely rudimentary SQL Engine (front-end parser) and a DBMS (back-end data structures). Our SQL Engine can be thought of as a bare-bone compiler. To test the SQL Engine and the DBMS, you will create a sample database. Finally (non-programming part), you will read up on the ODBC driver.
    Note that a real compiler and a DBMS have functionality that is way beyond what I am going to ask you to implement. In fact, your DBMS software creation may disregard issues regarding efficiency ? those that couple the DBMS to the OS i.e. page buffering, blocking, concurrency, etc. Ours will be a data-centric view i.e. we will only focus on how best to save the user data. Treat this as DBMS-101 (It is more like DBMS-1.01).
    Functionality:
    Your SQL-Engine/DBMS software must offer the following capability-
    Data: You must design data structures that will allow me to create tables and delete (drop) tables, insert tuples into tables, delete tuples from the tables and modify tuples values in tables possibly based on some criteria. Querying of course is the most important and frequently performed activity, but do NOT worry about joining tables or complicated queries. Data Serialization is of course implied by retrieval.
    Meta-Data/Data Dictionary: In addition, I should be able to look up names of all tables that exist or the table definitions that exist and so on.
    Future Requirements: I am being vague on this so that I may or may not add some small functionality later.
    Software Components:
    SQL Engine: Create a basic parser. Your parser should be able to parse the limited SQL statements that have been provided in Appendix A.
    ?     Include the test cases you used for the parser. Software Architecture and Implementation documents should also be attached.
    ?     Have the parser create parse trees for the sample SQL statements in accordance with your proposed grammar. The input could come from command-line or a stored file.
    ?     Print the parse trees (In-order and Pre-order) for sample input to present proof of correctness.
    ?     That completes the front-end of our SQL-engine.
    DBMS: Propose a data structure, which will house the actual database. The back-end of the program will ?walk? the parse tree and create/fill in the data-structures in the back-end DBMS accordingly.
    ?     Data Dictionary ? meta-data details. I.e. lists details about tables and fields.
    ?     Data Definition ? creation of tables.
    ?     Data Manipulation ? update/modify, storage and retrieval of records.
    ?     Disregard issues regarding efficiency ? those that couple the DBMS to the OS i.e. page buffer, blocking, etc.
    Database: Create a sample database to test your SQL/DBMS software. You must attach database schemas, tables with inserted values in your final submission.

    I have no comments on the parsing of the SQL language. Without looking at Appendix A, I can't tell what you are being asked to do. However I do have a suggestion for a rather bogus back end storage that seems to fit the spirit of the assignment.
    Create a directory named DB and in it keep files that are named things like
    int_Employee_ID
    string10_Employee_Name
    where you follow the naming convention
    DataType_TableName_FieldName
    What this does for you is this:
    To create a table just create files with the names and the datatypes that youwant.
    To delete a table just delet files that have that table name as the secon parameter
    The data dictionay is essentially a dump of the filenames in the directory.
    Given that the data type in encoded in the file name it is easy to locate the ith element in any file for reading or writing.
    Yes, it is bogus. It requires that you make dozens of disk reads to pick up all the pieces of a single record. Good thing efficiency was not listed as a requirement. You would NOT want this structure if you were looking for speed, or making sure that no tranaction gets only halfway done during a power outage.
    But since the assignment is NOT about building databases but rather about parsing SQL statements, this layout gives you a fairly transparent way to represent your data and allows you to do nice bogus things like to create your initial data all with a simple text editor.
    Since there are no joins to be requested of your system, all your SQL queries will essentially boil down into building filters that will run one or more of these lists and essentially create a list of indicies for records in a single table.

  • TOP 10 SQL QUERIES

    Hi,
    How can i find the top 10 sql queries which consuming high IO, CPU's. in oracle db.
    I am doing in one way that by using TOP command trying to get PID's then i am getting the sql query by applying the hash value in v$sqlarea.
    Is there any way to get directly high consumed IO and CPU's with out seeing PID's in TOP command.
    Thansk

    hi,
    try something along the lines of
    select c.* from
        (select disk_reads,
                buffer_gets,
                rows_processed,
                executions,
                first_load_time,
                sql_text
           from v$sqlarea
           where parsing_user_id !=0
           order by
              buffer_gets/decode(executions,null,1,0,1,executions) desc ) c
    where rownum < 11;
    select c.* from
        (select disk_reads,
                buffer_gets,
                rows_processed,
                executions,
                first_load_time,
                sql_text
           from v$sqlarea
           order by
              disk_reads/decode(rows_processed,null,1,0,1,rows_processed) desc ) c
    where rownum <11;or even
    --Top 10 by Buffer Gets:
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            buffer_gets, executions, buffer_gets/executions "Gets/Exec",
            hash_value,address
       FROM V$SQLAREA
      WHERE buffer_gets > 10000
    ORDER BY buffer_gets DESC)
    WHERE rownum <= 10
    --Top 10 by Physical Reads:
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            disk_reads, executions, disk_reads/executions "Reads/Exec",
            hash_value,address
       FROM V$SQLAREA
      WHERE disk_reads > 1000
    ORDER BY disk_reads DESC)
    WHERE rownum <= 10
    --Top 10 by Executions:
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            executions, rows_processed, rows_processed/executions "Rows/Exec",
            hash_value,address
       FROM V$SQLAREA
      WHERE executions > 100
    ORDER BY executions DESC)
    WHERE rownum <= 10
    --Top 10 by Parse Calls:
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            parse_calls, executions, hash_value,address
       FROM V$SQLAREA
      WHERE parse_calls > 1000
    ORDER BY parse_calls DESC)
    WHERE rownum <= 10
    --Top 10 by Sharable Memory:
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            sharable_mem, executions, hash_value,address
       FROM V$SQLAREA
      WHERE sharable_mem > 1048576
    ORDER BY sharable_mem DESC)
    WHERE rownum <= 10
    --Top 10 by Version Count:
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            version_count, executions, hash_value,address
       FROM V$SQLAREA
      WHERE version_count > 20
    ORDER BY version_count DESC)
    WHERE rownum <= 10
    ;you may have to play around with the column formatting a little to show the best results
    regards
    Alan
    Edited by: alanm on Dec 22, 2008 4:01 PM

  • Sysql - use SQL queries against output of linux commands

    Hello!
    Many linux commands have table-like output. Sometimes it is better to analyze such output as a real table in relational database. I have published prototype of utility that parses output of one or several linux commands, saves it in database and allows to make SQL queries to that data. Program is written on python and uses sqlite database engine.
    sysql at AUR
    sysql at Github
    Here is why I wrote it:
    * No need to remember command syntax to format command output - just select necessary fields in SQL query
    * No need to know sed, awk, head, join and other linux commands to manipulate with output - it's all SQLite
    * Table data is stored with meaningful column name and type (int, text, float, datetime etc)
    * All power of SQL can be used to query output (JOIN, WHERE, GROUP BY etc.)
    * To support new command, output parser must be developed only once and then can be shared with community to make life easier
    * All supported commands are kept in one place as set of python files, so it is easy to find out how to customize existing parsers or create new ones
    This is my first community contribution, so kindly ask everyone to share your opinions and advices on what can be done better. Thank you!
    Examples:
    Display help and list of available commands:
    sysql
    Display output of ps command:
    sysql ps
    Query output of lsblk command:
    sysql -q "SELECT device,uuid,filesystem FROM lsblk" lsblk
    Query output of several commands:
    sysql -q "SELECT ps.pid, ps.command, ps.elapsed_time, lsof.name FROM ps JOIN lsof ON ps.pid = lsof.pid WHERE name LIKE '%LISTEN%'" ps -e --- lsof -Pni4

    I am not sure, if I will ever use it, but I do think, this is an _amazing_ idea!
    You may consider something like a global repository for output parsers accessable directly via sysql.
    Last edited by myname (2013-11-24 09:16:59)

  • Error while running the sql queries in unix as cron job..

    Hi,
    I've configured some sql queries to run as cronjob from unix,i'm able to excute all the sql queries with out any error,after all the queries are executed,I'm getting the following error message.
    ORA-00600: internal error code, arguments: [4080], [1], [131], [], [], [], [],
    Could any one advise me why this error is being thrown?
    How to avoid this error?
    Thanks,
    Anil

    Are you running these queries through TopLink?
    If so, the error seems to be occurring on the database, when the query is being executed.
    I have never seen that error before. Performing some websearches it seems to be a general database error, potentially something to do with synchronization. Sorry I can't be of more help, perhaps the database forum can provide more insight...

  • Error while running PL/SQL XML Parser Samples

    every time try to run the PL/SQL XML Parser Sample program i get this error no file or directory, though the file and dir exists, i have the permissions setup as in readme.txt do i need to do any chnages to init.ora,
    pls advice
    Thanks,
    SQL> exec test
    begin test; end;
    ERROR at line 1:
    ORA-20100: Error occurred while parsing: No such file or directory
    ORA-06512: at "SCOTT.XMLPARSER", line 22
    ORA-06512: at "SCOTT.XMLPARSER", line 69
    ORA-06512: at "SCOTT.TEST", line 13
    ORA-06512: at line 1

    Which examples in particular? Thanks.

  • Need help in SQL Queries using GUI controls or variables

    Hello, all
    I have a big problem (I have already had with Visual Basic a few mounths ago) with Java while writing my SQL Queries.
    I would like to know how I must do to use variable data or GUI control data in my SQL Query to select only some records.
    Here, my first Query that works without any problem (no WHERE clause !!!) :
    Statement requeteBedes = connectBedes.createStatement();
    ResultSet resultatSeries = requeteBedes.executeQuery("SELECT * FROM Series");
    initComboBoxSeries(resultatSeries);the method "initComboBoxSeries" fills a JComboBox with all the names of the series in my database.
    Here comes my problem.I would like to use the value of the selected "series" in the JComboBox to search in another table of the same Database. I made another statement but it returns a Null ResultSet :
    ResultSet resultatSearchAlbumsFromSeries = requeteBedes.executeQuery("SELECT * FROM bandes_dess WHERE  ser_nom = '" + strComboBoxSeriesSelected + "' "); The variable strComboBoxSeriesSelected contains the value of the selected line in the combobox with all the series, filled after the first query that is here above and that works very well.
    Could some one help me and tell me how I must use variables or GUI controls values in my SQL Queries or tell me if there is a place where I could find an explanation of that kind of problems (like more "advanced SQL Queries", as the ones currently used in all the Learning Java 2 books)
    Thank you all for your help.
    Christian.

    executeQuery() will never return null. At least that's what the spec says. You are probably catching an exception (probably a syntax error caused by a single quote in strComboBoxSeriesSelected) and ignoring it. Or do you mean the ResultSet contains no rows?
    Anyway, to use parameterized queries, take a look at PreparedStatements. Your code should look like this using PreparedStatement:Statement requeteBedes = connectBedes.prepareStatement("SELECT * FROM bandes_dess WHERE  ser_nom = ?");
    requeteBedes.setString(1, strComboBoxSeriesSelected);
    ResultSet resultatSeries = requeteBedes.executeQuery();Alin.

  • How to get the SQL queries based on SQL_ID.

    Hi Experts,
    I want to get the SQL queries based on SQL_ID.
    I have tried the following query,but I am not getting full query.
    [code]SET linesize 132 pagesize 999
    column sql_fulltext format a60 word_wrap
    break on sql_text skip 1
    SELECT   REPLACE (TRANSLATE (sql_text, '0123456789', '999999999'), '9', ''),sql_id
    FROM   dba_hist_sqltext s
    WHERE   s.sql_id = '7tvurftg8zryb';[/code]
    One of my friend said use grid to get full query text.
    Can you please help me how to use grid ,else any other method to get the full query based on SQL_ID.
    Please help me.
    Thanks in advance.

    You have these many options to set, if sql_text is really huge. But better use a tool(TOAD) as it's really helpful and easy to use instead! (See my previous comment).
    column sql_text format A10000
    set echo off
    set head off
    set feed off
    set verify off
    set termout off
    set lines 10000
    set long 1000000
    set trimspool on
    set pages 0
    Thanks!

  • ?xml version = '1.0' encoding = 'ASCII'? pl/sql xml parser

    When ever I parse a document which has the
    <?xml version = '1.0' encoding = 'ASCII'?> tag as the first line hangs the pl/sql xml parser . If I remove the "encoding = 'ASCII'" from the file everything works fine ! What is the problem ?
    version 8.1.6 / plsql parser v2 / hpux 11x
    Here is the input file
    <?xml version = '1.0' encoding = 'ASCII'?>
    !--- This is a comment -->
    <person>
    <employee>
    <lastname>GHANTASALA</lastname>
    <firstname>SREE</firstname>
    <age>32</age>
    </employee>
    <employee>
    <lastname>TAMATAM</lastname>
    <firstname>SATISH</firstname>
    <age>30</age>
    </employee>
    </person>
    Here is my program
    declare
    p xmlparser.parser;
    doc xmldom.DOMDocument;
    dir varchar2(100) := '/apps/oracle/drugstore';
    errfile varchar2(30) := 'err.txt' ;
    inpfile varchar2(30) := 'person.xml';
    nl xmldom.DOMNodeList;
    len number;
    n xmldom.DOMNode;
    new_node xmldom.DOMNode;
    node_name varchar2(100);
    node_value varchar2(100);
    begin
    -- new parser
    p := xmlparser.newParser;
    -- Set some characteristics
    xmlparser.setValidationMode(p, FALSE);
    xmlparser.setErrorLog(p, dir&#0124; &#0124;'/'&#0124; &#0124; errfile );
    xmlparser.setBaseDir(p, dir);
    -- parse input file
    xmlparser.parse(p, dir&#0124; &#0124;'/'&#0124; &#0124;inpfile);
    -- get document
    doc := xmlparser.getDocument(p);
    -- get all elements
    nl := xmldom.getElementsByTagName(doc, '*');
    len := xmldom.getLength(nl);
    dbms_output.put_line('Length='&#0124; &#0124;len);
    -- loop through elements
    for i in 0..len-1 loop
    n := xmldom.item(nl, i);
    node_name := xmldom.getNodeName(n);
    -- get the text node associated with the element node
    n := xmldom.getFirstChild(n);
    if xmldom.getNodeType(n) = xmldom.TEXT_NODE then
    node_value := xmldom.getNodeValue(n);
    if node_name='lastname' then
    dbms_output.put_line('The value you are looking for is -->:'&#0124; &#0124;node_value);
    if node_value = 'GHANTASALA' then
    xmldom.setNodeValue(n,'TEST2');
    end if;
    end if;
    end if;
    end loop;
    new_node := xmldom.makeNode(doc);
    xmldom.writeToFile(new_node, dir &#0124; &#0124;'/'&#0124; &#0124;'mod.xml');
    end ;
    null

    The encoding header is actually generated by
    by the following piece of code in my pl/sql program .
    new_node := xmldom.makeNode(doc);
    xmldom.writeToFile(new_node, dir &#0124; &#0124;'/'&#0124; &#0124;'mod.xml');
    Since this is a document created by the pl/sql parser, I assume there is some meaning to it !
    Also why is it hanging ? PL/sql parser should tell me that it is not a valid string !

  • Developing portlets for dummies (sql queries)

    Hello, I've been trying to build a dynamic menu. First I went with just plain old plsql: i created a function in the portal schema that returns an unordered, nested list of the pages in my pagegroup and called that function in a regular pl/sql item on my portal page. I did this by querying the wwpob_page$ table and that went just great in my test&development setup (of which I am the admin of course :))
    Then I realized that since I'm not an administrator of the server hosting our portal and I only have very limited privileges (I am only a page group administrator) I will probably not be allowed to utilize this function nor will they agree to install it in the portal schema, and I decided I should build a portlet that does the same thing (so it can be registered and so on, and so it can use the synonyms and tools that are available to registered providers). There already is such a portlet (and provider) registered for use in the target portal, but I don't like it because i uses tables and hard-coded styles so I will cook my own, better version. :)
    So I downloaded an example portlet and am getting the hang of it, but now I just can't for the life of me figure out how to enable any sql-queries. I have run the provsyns-.sql script, logged in as test_provider/portal and installed my portlet-package as test_provider user. I can see the available pl/sql packages in Toad, but there are no tables or views for me to to see. That means I can't query the portal tables that I need to.
    edit: ok, stupid user error; I suck at using Toad, so I was looking at the wrong schema altogether :D So now i see the public views and packages, so forget that bit of the question.
    But still, I cannot see even wwsbr_all_folders -view, much less the wwpob_page$ -table. I cannot see any way to find the pages that are in my page group. Somehow it must be doable, right?
    Have I done something wrong, missed a step in enabling my test-provider / schema perhaps? I don't really know what I'm doing, but I followed instructions here: http://home.c2i.net/toreingolf/oracle/portal/my_first_plsql_portlet.htm (excellent instructions, thanks!)
    So should my portlet be able to access those tables or not? How the heck has the third partly portlet maker done it?
    i'm on OracleAS Portal 10g Release 2 (10.1.4)
    Edited by: Baguette on 23-Apr-2009 05:13
    Edited by: Baguette on 23-Apr-2009 05:32

    i see your perspective now. and let me give a perspective to my first reply too.
    what i proposed to you was the answer of what i quoted in the message. that is, why didn't you see those views in the new schema you created! and it is still ok but it is done in the portal schema for which you should have privielges too and i assumed you had. my mistake!
    now, i can relate your privacy concerns with your earlier message:
    Hello, I've been trying to build a dynamic menu. First I went with just plain old plsql: i created a function in the portal schema that returns an unordered, nested list of the pages in my pagegroup and called that function in a regular pl/sql item on my portal page. I did this by querying the wwpob_page$ table and that went just great in my test&development setup (of which I am the admin of course :))
    +Then I realized that since I'm not an administrator of the server hosting our portal and I only have very limited privileges (I am only a page group administrator) I will probably not be allowed to utilize this function nor will they agree to install it in the portal schema, and I decided I should build a portlet that does the same thing (so it can be registered and so on, and so it can use the synonyms and tools that are available to registered providers). There already is such a portlet (and provider) registered for use in the target portal, but I don't like it because i uses tables and hard-coded styles so I will cook my own, better version. :)+
    +So I downloaded an example portlet and am getting the hang of it, but now I just can't for the life of me figure out how to enable any sql-queries. I have run the provsyns-.sql script, logged in as test_provider/portal and installed my portlet-package as test_provider user. I can see the available pl/sql packages in Toad, but there are no tables or views for me to to see. That means I can't query the portal tables that I need to.+
    - by downloading an example portlet, you probably mean you created a new schema. because provsyns work on a schema.
    - if you are not the administrator of the portal, and may not be able to access some portions of the portal, it means that you do not use the portal user (the user which serves as the owner of the portal schema).
    - now, your plan to create a new schema and give those privielges would still not work. because, by creating a new schema you cannot sneak in to the oriignal portal schema if you do not have privileges to do it. obvious, right? otherwise, it would be a vulnerability of the software that you can see what you are not allowed to see by creating a new schema.
    - however, there is a bright side here. the views give records based on your privileges.
    - so if your administrators have generated them already or if they generate on the original portal schema, then you may see the pages and items that you have privileges to see and no more.
    so now, you may ask the administrators if they have already done it, and if not, then if they would be willing to do it.
    hope that helps!
    AMN

  • Ruby code for sql queries

    Hello everybody,
    First off, let me apologize if my inquiry does not belong on this forum. I am confident however, that someone here has had experience with this since Oracle and ruby on rails/ruby are used frequently. My fingers are crossed, here's is my problem:
    I am currently working on a database system that utilizes ruby on rails
    with a oracle database. Here's the situation:
    the ruby on rails web application is up and running;
    my oracle database is full of tables that are populated with data;
    there is a successful connection between rails and my oracle database;
    however, what isn't finished is I currently have data mining queries in
    sql (eg. find minimum time someone has been employed = "Select
    min(time) from table...etc") and what I need to do is write one ruby
    program for each of my sql queries so that the ruby program:
    1) connects to the oracle database each time the query is called
    2) runs the sql query on the oracle database
    3) takes the results from the query and returns them in an array or
    something of that nature (so that I can use the results in an html file
    on the ruby on rails web application).
    Again, I apologize if this question does not belong on this forum. If someone however has experience with this could you please give me example code of what this would look like (using different sql queries). Thank you

    I apologize if this question does not belong on this forum. OTN does have a forum dedicated to Ruby/Ruby On Rails. I admit it doesn't seem to get much traffic. I think that's because most people working with Ruby tend to go for F/OSS products.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • ? in SQL Queries and not using prepared statements

    Using EclipseLink 1.1.1
    Prepared Statements are disabled
    In our production server something went wrong and one of our Read Queries started erroring. A DatabaseException was thrown and we log the "getQuery.getSQLString()" statement. We found this query in the logs:
    SELECT t1.ID, t1.NAME, t1.DESCRIPTION, t1.EXTREFID, t1.STYLESHEET, t1.DDSVNVERSION, t1.FIRSTNAME, t1.LASTNAME, t1.EMAILADDR, t1.PHONENUMBER, t1.ADDRESS, t1.ADDRESS2, t1.CITY, t1.STATE, t1.POSTALCODE, t1.COUNTRY, t1.ADMINACCTNAME, t1.HASDOCUMENTS, t1.HASTIMEDNOTIFICATIONS, t1.STATUS, t1.ENTRYDATE, t1.EVALEXPDATE, t1.LASTREMINDDATE, t1.FULLUSERS, t1.LIMUSERS, t1.REQUSERS, t1.ISENTERPRISE, t1.EXPDATE, t1.ISDISABLED, t1.DISABLEDDATE, t1.NEEDLICENSEAGREEMENT, t1.ISWARNINGDISABLED, t1.LOCALE, t1.TIMEZONE, t1.CURRENCY, t1.DOMAIN, t1.DOCUMENTSIZE, t1.EXTRADOCUMENTSTORAGE, t1.ONDEMANDOPTIONS, t1.SSOTYPE, t1.RESELLERID, t1.ACCOUNTREPID, t1.LASTUSAGEREPORTDATE, t1.NEXTUSAGEREPORTDATE, t1.USAGEREPORTATTEMPTS FROM T_SSOOPTIONS t0, T_CUSTOMERS t1 WHERE *((((t0.SSOENABLED = ?) AND (t1.SSOTYPE IN (?, ?))) AND (UPPER(t1.DOMAIN) = ?)) AND (t0.CUSTOMERID = t1.ID))*
    Notice the values weren't entered into the where clause. We had to bounce the application to fix the problem. I've never seen this before. I've added more debugging statements to the code - so if this happens again in the future I'll have more information to report on. In the mean time I'm wondering if anyone else has every seen a problem of this nature.

    Database error due to invalid SQL statement.
    I don't have a stack, we were catching the exception and not printing the stack :(
    Like I mentioned in my first post, I added more debugging code (e.printStackTrace()). I understand this is hard to track down without more information. I was just hoping you guys had seen something like this before and had any insight. Like I mentioned before: this is on our production server. I've never seen this type of error before. That particular server (we run in a cluster mode) had been up for several days and then started generating that error. IT bounced the node and everything went back to normal. We have been using toplink for about 5 years now and have never seen this problem, until August 3rd 2009. The only thing that has changed recently is our migration from toplink 10 to EclipseLink. I was wondering if anyone knows if anything had changed in EclipseLink/toplink 11 with the generation of SQL queries.
    I'll keep looking. There is more debugging code in there now. Since the error was "Database error due to invalid SQL statement" this implies the SQL was generated, exited that part of the code and was sent to the db where it failed. I'm afraid the printStackTrace won't help if this error happens again.

  • PL/SQL XML Parser demo

    i've downloaded the Pl/SQL XML parser demo - xslsample / domsample - followed the guide , etc but I'm getting ....
    BEGIN xslsample ('/export/home/oracle/plmx/sample','family.xml','iden.xsl','family.out','errors.txt'); END;
    ERROR at line 1:
    ORA-29516: Aurora assertion failure: Assertion failure at eox.c:187
    Uncaught exception Root of all Java exceptions:
    ORA-06512: at "PLMX.XMLPARSERCOVER", line 0
    ORA-06512: at "PLMX.XMLPARSER", line 57
    ORA-06512: at "PLMX.XSLSAMPLE", line 28
    ORA-06512: at line 1
    anybody seen this ??

    There is no such limit on our Parser for PL/SQL. Could you
    perhaps be using the PLXML Utilities? If you are you might try
    our PL/SQL Parser instead.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Premal Mehta (guest) wrote:
    : Hi
    : I am using PL/SQL XML Parser to add XML data in database. I
    : am having trouble when using file sixe greater than 500KB?
    : What is the alternative? Can I do something to process
    larger
    : files?
    : Please Help, this is quite urgent.
    : Hoping for help,
    : Premal.
    null

Maybe you are looking for

  • External Hard Drive Compatible with Mac and Windows?

    So my old laptop is a Dell Latitude and I bought a Western Digital external hard drive and put all my files/pics/music on it. The information the WD came with said its compatible with Mac and Windows, but when I plug it into my brand spankin new Macb

  • Ad hoc Approver at last step SHC PO Bid

    Hi, I am encountering approval for the last step once I added an adhoc in the middle of the approvals, it is ok, but once I added the adhoc approver at the last, the document becomes approved already without the actual approving the document. And whe

  • I've found a solution to 1327 error why can't I post it?

    I tried to download acrobat reader 10 recently and got the 1327 error invalid drive mapping.   We don't use Microsoft servers and redirecting folders on windows 7 is a real hassle - so the suggestions to do that weren't real helpful.  However, there

  • Where is Java ControlPanel

    I would like to configure the JVM setting (ie. max heap size etc) when an applet is launched. I can do this with the ControlPanel program comes with the jre on other OS, but I can't seem to find the program on OS X. Does anyone have any idea how to d

  • Were is the billing circle start?

    Hello to any body! Im a little confuse??!! I got into contract on October 1 2013; everything was looking good: service on my new phone and my daughter and my husband too. Internet data verrrry good. Right now today Oct. 4 2013 I receive a bill with t