Format SQL parser issues

Hi,
The Format SQL parser (up to latest 14.67) seems to have problems with certain characters (íìóò...), even though they're inside comments:
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
stop here
line 75:25: unexpected char: 0xF3
at oracle.dbtools.formatter.parser.PLSQLLexer.nextToken(PLSQLLexer.java:
773)
at oracle.dbtools.formatter.parser.PLSQLLexer.getNextToken(PLSQLLexer.ja
va:72)
at oracle.dbtools.formatter.PrettyPLSQL.format(PrettyPLSQL.java:66)
at oracle.dbtools.formatter.PrettyPLSQL.format(PrettyPLSQL.java:25)
at oracle.dbtools.sqlformatter.SQLFormatCommand.formatSQL(SQLFormatComma
nd.java:338)
at oracle.dbtools.sqlformatter.SQLFormatCommand.doit(SQLFormatCommand.ja
va:92)
at oracle.ide.controller.CommandProcessor$UndoStack.executeCommand(Comma
ndProcessor.java:819)
at oracle.ide.controller.CommandProcessor$UndoStack.doit(CommandProcesso
r.java:715)
at oracle.ide.controller.CommandProcessor$MasterStack.doit(CommandProces
sor.java:1004)
at oracle.ide.controller.CommandProcessor.invoke(CommandProcessor.java:1
78)
at oracle.dbtools.sqlformatter.SQLFormatter.executeCommand(SQLFormatter.
java:131)
at oracle.dbtools.sqlformatter.SQLFormatter.invoke(SQLFormatter.java:120
at oracle.dbtools.sqlformatter.SQLFormatter.handleEvent(SQLFormatter.jav
a:192)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:530)
at oracle.ide.controller.IdeAction$1.run(IdeAction.java:785)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:80
4)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:499)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:18
49)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1
000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMen
uItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
I tried to evade the bug by making a selection of what I want to format, but the parser always starts at the beginning of the code. It's pretty incoherent that you make a selection, right-click on it for context-sensitive options, but then get results on the whole document. I would name it a bug: either disable (gray out) the functionality when there's a selection (indicating that's not supported right now), or do what the user expects to be done.
Could you please fix the parser bug and implement the selection-wise format feature?
TIA,
K.

Barry,
Originally, I wanted to format a package made in another editor, having the indents horribly aligned.
The error I got is the one I mentioned: the 'ó' character inside a '--' comment.
Then I tried formatting only a selection of text, which also fails, as mentioned.
You can reproduce also in the SQL worksheet, also with other accentuated chars, and even in string values. For instance, try to format 'sELeCT 'testó' fROm DuaL;'.
Failing to format is probably a parser bug.
Formatting the whole pane instead of just the selected range of text is a flaw in application logic. If it's too hard to implement (or it gets low prio so it never gets fixed), I suggest disabling the entry when having made a selection. This would prevent the possibility of screwing up code when not being asked for.
Thanks for your interest!
K.

Similar Messages

  • 1.5 - Apparent SQL parsing issue...

    Hi,
    After installing the 1.5 release - I noticed that some INSERT statements that had worked fine in 1.2 were suddenly failing with syntactical errors in 1.5. This occurs for the same exact database instance (an Oracle 10.2.0.3 Enterprise Edition for HP/UX Itanium database).
    I am running 1.5 on Windows XP Professional.
    Example:
    This INSERT statement works fine in 1.2:
    INSERT INTO joe
      ( a
      , b
      , c
    SELECT
         a
      , NVL (b
            , a) AS b
      , NVL (c
            , a) AS c
    FROM bill;But in 1.5 - it fails with error message:
    "ORA-00923: FROM keyword not found where expected
    00923. 00000 - "FROM keyword not found where expected"
    *Cause:
    *Action:
    Error at Line:12 Column:11
    Could you kindly confirm if there is an issue?
    Thanks!

    Hi PDaddy,
    There appears to be a problem with blank lines confusion with continuation characters.
    drop table joe;
    create table joe(a varchar2(100), b varchar2(100), c varchar2(100));
    drop table bill;
    create table bill(a varchar2(100), b varchar2(100), c varchar2(100));
    INSERT INTO joe
    ( a
    , b
    , c
    SELECT
    a
    , NVL (b
    , a) AS b
    , NVL (c
    , a) AS c
    FROM bill;
    Error starting at line 5 in command:
    INSERT INTO joe
    ( a
    SELECT
    a
    , a) AS b
    , a) AS c
    FROM bill
    Error at Command Line:16 Column:11
    Error report:
    SQL Error: ORA-00923: FROM keyword not found where expected
    00923. 00000 - "FROM keyword not found where expected"
    *Cause:   
    *Action:
    Bug logged OTNFORUMS: BUG CONFUSING -- WITH CONTINUATION CHARACTER.
    -- put some text here
    is processed OK but
    is currently broken.
    Turloch

  • Parsing Issue in Filter For Date Format

    Hi Folks,
    I am having Parsing Issue on "Key Date" Object in Universe. See the Error and Code below for your review
    Error: Parse Failed: Exception: DBD, The value entered is not valid. It must adhere to one of the following formats.
    YYYYMMDD
    DD.MM.YYYYState:N/A
    Code:
    <OPERATOR VALUE="AND"><OPTIONAL><FILTER KEY="0I_DAYIN"><CONDITION OPERATORCONDITION="Between"><CONSTANT TECH_NAME="@Prompt('Day Interval From','A','Calendar Day\LovDay IntervalBase',mono,primary_key)"/><CONSTANT TECH_NAME="@Prompt('Day Interval To','A','Calendar Day\LovDay IntervalBase',mono,primary_key)"/></CONDITION></FILTER></OPTIONAL><FILTER KEY="0P_KEYDA"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Key Date','D',,mono,free)"/></CONDITION></FILTER></OPERATOR>
    This universe is created by someone else and client need to modify it with a calendar but i did not modify it yet however its already giving me the hard time. Kindly advise, any kind of help will be appreciated
    Thanks

    Hi,
    With the information provided I cannot for sure get to the error but here is what I would check.
    Firstly, I was wondering if the 5th parameter in the @Prompt can be Primary_Key. I thought it would be either free or constrained.
    Secondly, please the LOV values for the @ prompt are being populated from 'Calendar Day\LovDay IntervalBase'. So I would check the date format being used there.
    Third, the To and From dates are alphaneumeric and not dates, so I am not sure how the comparision would happen.
    Hope this helps.
    Regards,
    Madhur

  • PL/SQL speed issues when using a variable

    I have a very strange issue that is causing problems.
    I am running Golden connecting to a 11g database.
    I created a procedure to insert records into a table based on a query. The source query includes variables that I have populated prior to the insert statement. The problem is that if I use the variable for one very specific where statement, the statement goes from running in less than 1 second, to running in 15 minutes. It gets even more strange though. Not only does a 2nd variable not cause any problems, the exact same variable in the same statement works fine.
    This procedure takes 15 minutes to run.
    declare
        v_start_period date;
        v_end_period date;
    begin
        select add_months(trunc(sysdate,'mm'), -1), trunc(sysdate,'mm')
        into v_start_period, v_end_period
        from dual;
        insert into RESULTS_TABLE
                (first_audit_date, last_audit_date,
                data_column1, data_column2, data_column3)
            select
                a.first_audit_date, a.last_audit_date,
                b.data_column1, b.data_column2, b.data_column3
            from
                SOURCE_TABLE_1 b,
                (select marker_id, min(action_time) as first_audit_date, max(action_time) as last_audit_date
                    from SOURCE_TABLE_2
                    where action_time >= v_start_period and action_time < v_end_period
                    group by marker_id) a
            where b.marker_id = a.marker_id
                and exists (select 1 from SOURCE_TABLE_2
                    where marker_id = b.marker_id
                    and action_time >= v_start_period and action_time < v_end_period
                    and action_type = 'XYZ');
        commit;
    end;This procedure runs in less than 1 second, yet returns the exact same results.
    declare
        v_start_period date;
        v_end_period date;
    begin
        select add_months(trunc(sysdate,'mm'), -1), trunc(sysdate,'mm')
        into v_start_period, v_end_period
        from dual;
        insert into RESULTS_TABLE
                (first_audit_date, last_audit_date,
                data_column1, data_column2, data_column3)
            select
                a.first_audit_date, a.last_audit_date,
                b.data_column1, b.data_column2, b.data_column3
            from
                SOURCE_TABLE_1 b,
                (select marker_id, min(action_time) as first_audit_date, max(action_time) as last_audit_date
                    from SOURCE_TABLE_2
                    where action_time >= v_start_period and action_time < trunc(sysdate,'mm')
                    group by marker_id) a
            where b.marker_id = a.marker_id
                and exists (select 1 from SOURCE_TABLE_2
                    where marker_id = b.marker_id
                    and action_time >= v_start_period and action_time < v_end_period
                    and action_type = 'XYZ');
        commit;
    end;The only difference between the two is where I replace the first v_end_period variable with trunc(sysdate,'mm').
    I've been googling for possible solutions and keep running into something called "parameter sniffing". It appears to be a SQL Server issue though, as I cannot find solutions for Oracle. I tried nesting the insert statement inside it's own procedure with new variables populated by the old variables, but nothing changed.
    Edited by: user_7000017 on Jan 8, 2013 9:45 AM
    Edited by: user_7000017 on Jan 8, 2013 9:52 AM Put the code in code tags.

    You are not describing procedures. You are listing anonymous PL/SQL blocks.
    As for the code - this approach to assigning PL/SQL variables are highly questionable. As the functions are native PL/SQL functions too, there is no need to parse and execute a SQL cursor, do context switching, in order to assign values to PL/SQL variables.
    This is wrong:
    select
        add_months(trunc(sysdate,'mm'), -1), trunc(sysdate,'mm')
        into v_start_period, v_end_period
    from dual;This is correct:
    v_start_period := add_months(trunc(sysdate,'mm'), -1);
    v_end_period := trunc(sysdate,'mm');Just as you would not use +"select 1 into plVariable from dual;+", instead of a standard variable assignment statement like +"plVariable := 1;"+.
    As for the performance/execution difference. Does not make sense. I suggest simplifying the code in order to isolate the problem. For example, take that in-line SQL (aliased as a in the main SQL) and create a testcase where it uses the function, versus a PL/SQL bind variable with the same data type and value as that returned by the function. Examine and compare the execution plans.
    Increase complexity (if no error) and repeat. Until the error is isolated.
    The 1st step in any troubleshooting, is IDENTIFYING the problem. Without knowing what the problem is, how can one fix it?

  • PL/SQL Parser engine

    Hi,
    I am developing a logging framework, where applications which are initiating PL/SQL transactions also log the same using our framework. The reason being, the application owner can then analyze data from these logs. I was wondering whether there is something in existence like the "General SQL Parser" for a linux based c++ component, so that we can parse the PL/SQL blocks and represent the data in a certain format.
    Are there any ORACLE libraries that I can use, which would work with PYTHON or any other scripting languages and parse the PL/SQLs albeit out of the scope of the ORACLE DB itself.
    Do let me know,
    cheers,
    jags

    Our logging framework is a generic c++ framework, where applications have a 2 stage approach
    1) Execute the SQL transaction to their DB host.
    2) The same SQL transaction is then logged to our framework (non DB), we then generate reports on these SQL transactions.
    We are already handling parsing the log data for the SQL commands but need something for the PL/SQL blocks.

  • Bpel parsing issue with special characters...

    Hi All,
    We are integrating Oracle Sales Order information with OTM as Order Releases.
    For this we are sending the Sales Order in the form of clob from the procedure to the Bpel process.
    1. A PL/SQL procedure would send the Sales order XML as a CLOB.
    2.In the BPEL process , we are performing ora:parseXML() function on the clob obtained.
    3.A patch was installed on the BPEL SOA server:
    10.1.3.3.1 MLR#8, Patch#6906880 which was supposed to handle all the parsing activities at run time.
    4. But when ever any special character viz..; #,UNIT¿S etc the BPEL process is failing with a fault string due to Parsing error.
    5. Could you please provide us a workaround for solving this issue ASAP with all the special characters.
    I have provided a sample xml tag due to which the parsing is failing in the bpel process. here it is failing because it is not able to parse : UNIT¿S successfully...
    <SHIPPING_INSTRUCTIONS>
    **San Dieg UNIT¿S contact name is Jenny Haden 858-609-1170** 12/12/08
    **Updated Contact is ASHTON REYES 72-696-1525, hours are 830-5 only, N/S. Millyz DELIVERY
    CONTACT: ELLEN HILGER @ 248-932-9000: LINE 4.1 -TRIAL CONVERSION FROM ORDER # 25766204
    </SHIPPING_INSTRUCTIONS>
    is there some other bpel patch or some other workaround using which whatever input value comes in , the bpel is able
    to successully parse that through..
    we are stuck with this special character parsing issue as of now and go live is very near ...your help/inputs would be highly appreciated
    thanks

    Guys,
    I am new to OTM and SOA/BPEL architecture.
    Could you please suggest me in detail as how to integrate OTM with outside world using BPEL.
    Thanks,
    Kamleshwar

  • Oracle 11g - External Table/SQL Developer Issue?

    Oracle 11g - External Table/SQL Developer Issue?
    ==============================
    I hope this is the right forum for this issue, if not let me, where to go.
    We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
    We are trying to use oracle external table to load text files in .csv format. Here is our data look like.
    ======================
    Date1,date2,Political party,Name, ROLE
    20-Jan-66,22-Nov-69,Democratic,"John ", MMM
    22-Nov-70,20-Jan-71,Democratic,"John Jr.",MMM
    20-Jan-68,9-Aug-70,Republican,"Rick Ford Sr.", MMM
    9-Aug-72,20-Jan-75,Republican,Henry,MMM
    ------ ALL NULL -- record
    20-Jan-80,20-Jan-89,Democratic,"Donald Smith",MMM
    ======================
    Our Expernal table structures is as follows
    CREATE TABLE P_LOAD
    DATE1 VARCHAR2(10),
    DATE2 VARCHAR2(10),
    POL_PRTY VARCHAR2(30),
    P_NAME VARCHAR2(30),
    P_ROLE VARCHAR2(5)
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY P_EXT_TAB_D
    ACCESS PARAMETERS (
    RECORDS DELIMITED by NEWLINE
    SKIP 1
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' LDRTRIM
    REJECT ROWS WITH ALL NULL FIELDS
    MISSING FIELD VALUES ARE NULL
    DATE1 CHAR (10) Terminated by "," ,
    DATE2 CHAR (10) Terminated by "," ,
    POL_PRTY CHAR (30) Terminated by "," ,
    P_NAME CHAR (30) Terminated by "," OPTIONALLY ENCLOSED BY '"' ,
    P_ROLE CHAR (5) Terminated by ","
    LOCATION ('Input.dat')
    REJECT LIMIT UNLIMITED;
         It created successfully using SQL Developer
    Here is the issue.
    It is not loading the records, where fields are enclosed in '"' (Rec # 2,3,4,7)
    It is loading all NULL value record (Rec # 6)     
    *** If we remove the '"' from input data, it loads all records including all NULL records
    Log file has
    KUP-04021: field formatting error for field P_NAME
    KUP-04036: second enclosing delimiter not found
    KUP-04101: record 2 rejected in file ....
    Our questions
    Why did "REJECT ROWS WITH ALL NULL FIELDS" not working?
    Why did Terminated by "," OPTIONALLY ENCLOSED BY '"' not working?
    Any idea?
    Thanks in helping.

    I don't think this is a SQLDeveloper issue. You will get better answers in the Database - General or perhaps SQL and PL/SQL forums.

  • Name Notation in PLSQL Code causes '= '.. '= ' when applying "Format SQL"

    When comiled you have to do a search replace to fix.
    Also if your wrap around is 132 lines, then Format SQL should also do the same, and not extend the lines to some ridiculous length.
    Thanks you for a wonderful product.

    Thanks for the feedback.
    Another user Pete had the same issue
    (see SQL format problem
    and it was fixed today.
    As for the format width(132 lines) Ill see if I can get this fixed for the next release.
    Regards,
    Dermot.

  • Performance degradation in pl/sql parsing

    We are trying to use xml pl/sql parser and noticed performance degradation as we run multiple times. We zeroed into the following clause:
    doc := xmlparser.getDocument(p);
    The first time the procedure is run the elapsed time at sqlplus is something like .45sec, but as we run repeatedly in the same session the elapsed time keeps on increasing by .02 seconds. If we log out and start fresh, we start again from .45sec.
    We noticed similar degradation with
    p := xmlparser.newParser;
    but we got around by making the 'p' variable as package variable, initializing it once and using the same for all invocations.
    Any suggestions?
    Thank you.

    Can I enhance the PL/SQL code for better performance ? Probably you can enhance it.
    or, is this OK to take so long to process these many rows? It should take a few minutes, not several hours.
    But please provide some more details like your database version etc.
    I suggest to TRACE the session that executes the PL/SQL code, with WAIT events, so you'll see where and on what time is spent, you'll identify your 'problem statements very quickly' (after you or your DBA have TKPROF'ed the trace file).
    SQL> alter session set events '10046 trace name context forever, level 12';
    SQL> execute your PL/SQL code here
    SQL> exitWill give you a .trc file in your udump directory on the server.
    http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php
    Also this informative thread can give you more ideas:
    HOW TO: Post a SQL statement tuning request - template posting
    as well as doing a search on 10046 at AskTom, http://asktom.oracle.com will give you more examples.
    and reading Oracle's Performance Tuning Guide: http://www.oracle.com/pls/db102/to_toc?pathname=server.102%2Fb14211%2Ftoc.htm&remark=portal+%28Getting+Started%29

  • SQL Performance issue: Using user defined function with group by

    Hi Everyone,
    im new here and I really could need some help on a weird performance issue. I hope this is the right topic for SQL performance issues.
    Well ok, i create a function for converting a date from timezone GMT to a specified timzeone.
    CREATE OR REPLACE FUNCTION I3S_REP_1.fnc_user_rep_date_to_local (date_in IN date, tz_name_in IN VARCHAR2) RETURN date
    IS
    tz_name VARCHAR2(100);
    date_out date;
    BEGIN
    SELECT
    to_date(to_char(cast(from_tz(cast( date_in AS TIMESTAMP),'GMT')AT
    TIME ZONE (tz_name_in) AS DATE),'dd-mm-yyyy hh24:mi:ss'),'dd-mm-yyyy hh24:mi:ss')
    INTO date_out
    FROM dual;
    RETURN date_out;
    END fnc_user_rep_date_to_local;The following statement is just an example, the real statement is much more complex. So I select some date values from a table and aggregate a little.
    select
    stp_end_stamp,
    count(*) noi
    from step
    where
    stp_end_stamp
    BETWEEN
    to_date('23-05-2009 00:00:00','dd-mm-yyyy hh24:mi:ss')      
    AND
    to_date('23-07-2009 00:00:00','dd-mm-yyyy hh24:mi:ss')
    group by
    stp_end_stampThis statement selects ~70000 rows and needs ~ 70ms
    If i use the function it selects the same number of rows ;-) and takes ~ 4 sec ...
    select
    fnc_user_rep_date_to_local(stp_end_stamp,'Europe/Berlin'),
    count(*) noi
    from step
    where
    stp_end_stamp
    BETWEEN
    to_date('23-05-2009 00:00:00','dd-mm-yyyy hh24:mi:ss')      
    AND
    to_date('23-07-2009 00:00:00','dd-mm-yyyy hh24:mi:ss')
    group by
    fnc_user_rep_date_to_local(stp_end_stamp,'Europe/Berlin')I understand that the DB has to execute the function for each row.
    But if I execute the following statement, it takes only ~90ms ...
    select
    fnc_user_rep_date_to_gmt(stp_end_stamp,'Europe/Berlin','ny21654'),
    noi
    from
    select
    stp_end_stamp,
    count(*) noi
    from step
    where
    stp_end_stamp
    BETWEEN
    to_date('23-05-2009 00:00:00','dd-mm-yyyy hh24:mi:ss')      
    AND
    to_date('23-07-2009 00:00:00','dd-mm-yyyy hh24:mi:ss')
    group by
    stp_end_stamp
    )The execution plan for all three statements is EXACTLY the same!!!
    Usually i would say, that I use the third statement and the world is in order. BUT I'm working on a BI project with a tool called Business Objects and it generates SQL, so my hands are bound and I can't make this tool to generate the SQL as a subselect.
    My questions are:
    Why is the second statement sooo much slower than the third?
    and
    Howcan I force the optimizer to do whatever he is doing to make the third statement so fast?
    I would really appreciate some help on this really weird issue.
    Thanks in advance,
    Andi

    Hi,
    The execution plan for all three statements is EXACTLY the same!!!Not exactly. Plans are the same - true. They uses slightly different approach to call function. See:
    drop table t cascade constraints purge;
    create table t as select mod(rownum,10) id, cast('x' as char(500)) pad from dual connect by level <= 10000;
    exec dbms_stats.gather_table_stats(user, 't');
    create or replace function test_fnc(p_int number) return number is
    begin
        return trunc(p_int);
    end;
    explain plan for select id from t group by id;
    select * from table(dbms_xplan.display(null,null,'advanced'));
    explain plan for select test_fnc(id) from t group by test_fnc(id);
    select * from table(dbms_xplan.display(null,null,'advanced'));
    explain plan for select test_fnc(id) from (select id from t group by id);
    select * from table(dbms_xplan.display(null,null,'advanced'));Output:
    PLAN_TABLE_OUTPUT
    Plan hash value: 47235625
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |    10 |    30 |   162   (3)| 00:00:02 |
    |   1 |  HASH GROUP BY     |      |    10 |    30 |   162   (3)| 00:00:02 |
    |   2 |   TABLE ACCESS FULL| T    | 10000 | 30000 |   159   (1)| 00:00:02 |
    Query Block Name / Object Alias (identified by operation id):
       1 - SEL$1
       2 - SEL$1 / T@SEL$1
    Outline Data
      /*+
          BEGIN_OUTLINE_DATA
          FULL(@"SEL$1" "T"@"SEL$1")
          OUTLINE_LEAF(@"SEL$1")
          ALL_ROWS
          OPTIMIZER_FEATURES_ENABLE('10.2.0.4')
          IGNORE_OPTIM_EMBEDDED_HINTS
          END_OUTLINE_DATA
    Column Projection Information (identified by operation id):
       1 - (#keys=1) "ID"[NUMBER,22]
       2 - "ID"[NUMBER,22]
    34 rows selected.
    SQL>
    Explained.
    SQL>
    PLAN_TABLE_OUTPUT
    Plan hash value: 47235625
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |    10 |    30 |   162   (3)| 00:00:02 |
    |   1 |  HASH GROUP BY     |      |    10 |    30 |   162   (3)| 00:00:02 |
    |   2 |   TABLE ACCESS FULL| T    | 10000 | 30000 |   159   (1)| 00:00:02 |
    Query Block Name / Object Alias (identified by operation id):
       1 - SEL$1
       2 - SEL$1 / T@SEL$1
    Outline Data
      /*+
          BEGIN_OUTLINE_DATA
          FULL(@"SEL$1" "T"@"SEL$1")
          OUTLINE_LEAF(@"SEL$1")
          ALL_ROWS
          OPTIMIZER_FEATURES_ENABLE('10.2.0.4')
          IGNORE_OPTIM_EMBEDDED_HINTS
          END_OUTLINE_DATA
    Column Projection Information (identified by operation id):
       1 - (#keys=1) "TEST_FNC"("ID")[22]
       2 - "ID"[NUMBER,22]
    34 rows selected.
    SQL>
    Explained.
    SQL> select * from table(dbms_xplan.display(null,null,'advanced'));
    PLAN_TABLE_OUTPUT
    Plan hash value: 47235625
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |    10 |    30 |   162   (3)| 00:00:02 |
    |   1 |  HASH GROUP BY     |      |    10 |    30 |   162   (3)| 00:00:02 |
    |   2 |   TABLE ACCESS FULL| T    | 10000 | 30000 |   159   (1)| 00:00:02 |
    Query Block Name / Object Alias (identified by operation id):
       1 - SEL$F5BB74E1
       2 - SEL$F5BB74E1 / T@SEL$2
    Outline Data
      /*+
          BEGIN_OUTLINE_DATA
          FULL(@"SEL$F5BB74E1" "T"@"SEL$2")
          OUTLINE(@"SEL$2")
          OUTLINE(@"SEL$1")
          MERGE(@"SEL$2")
          OUTLINE_LEAF(@"SEL$F5BB74E1")
          ALL_ROWS
          OPTIMIZER_FEATURES_ENABLE('10.2.0.4')
          IGNORE_OPTIM_EMBEDDED_HINTS
          END_OUTLINE_DATA
    Column Projection Information (identified by operation id):
       1 - (#keys=1) "ID"[NUMBER,22]
       2 - "ID"[NUMBER,22]
    37 rows selected.

  • How to track the sql commands issued against database

    Hello, We are using an interface developed by oracle forms. Its giving some error while pressing an icon. I can not able to trace out from where it arises. This error is displayed by form developed by oracle forms. I dont have source code to track it. I would like to know , which SQL statement rises the error, so that I can update the oracle object and can able to solve the problem if I can able to find the exect SQL statment issued before the error was displayed. kindly help me . thanks.

    habfat wrote:
    Hello, We are using an interface developed by oracle forms. Its giving some error while pressing an icon. I can not able to trace out from where it arises. This error is displayed by form developed by oracle forms. I dont have source code to track it. I would like to know , which SQL statement rises the error, so that I can update the oracle object and can able to solve the problem if I can able to find the exect SQL statment issued before the error was displayed. kindly help me . thanks.Hmm, well kind of a silly but still, if you don't have source code of the form( you said so) so even if you would come to know what statement is raising the error, how would you go and edit it ? Did I miss some thing? And you asked for a sql statement ? How did you come to know that its a sql statement that is causing the error? And if that's actually a sql statement error, isn't it associated with a meaningful message ?
    Find the developer who coded the application, he would be the best person to track the error and tell you its resolution IMO.
    HTH
    Aman....

  • Validating XML with PL/SQL parser

    How can i validate a xml that is on a buffer with the grammar
    stored in a BLOB column of o table? I'm using PL/SQL parser and
    i can parse it correctly but i don't know how can i validate it
    because my grammar is stored in DB.
    null

    Ana Lucia (guest) wrote:
    : How can i validate a xml that is on a buffer with the grammar
    : stored in a BLOB column of o table? I'm using PL/SQL parser
    and
    : i can parse it correctly but i don't know how can i validate
    it
    : because my grammar is stored in DB.
    You can't currently but this will be available in our next
    release.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Logging errors in PL/SQL Parser

    Using PL/SQL Parser, is it possible to obtain the parsing errors
    output in other place than a file (ref: setErrorLog function)?
    as varchar variables or kind?
    null

    M Leclair (guest) wrote:
    : Using PL/SQL Parser, is it possible to obtain the parsing
    errors
    : output in other place than a file (ref: setErrorLog function)?
    : as varchar variables or kind?
    It is not possible at this time. It has been filed as an
    enhancement request.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Does PL/SQL Parser Validate?

    Just wondering if the PL/SQL parser can parse in validation mode?
    I think I remember reading that the PL/SQL parser is a non-validating parser only but I didn't know if this changed.
    Thanks for you help

    I am also experiencing problems with the setDocumentType
    This is my code
    p := xmlparser.newParser;
    xmlparser.parseBuffer(p,'<My_Data/>');
    doc := xmlparser.getDocument(p);
    docNode := xmldom.makeNode(doc);
    xmldom.setVersion(doc, '1.0');
    OuterNode := xmldom.getLastChild(docNode);
    --Get DTD to parse against
    xmlparser.setValidationMode(p,TRUE);
    xmlparser.parseDTD(p,'c:\temp\v109.dtd','My_Data');
    --Set DTD to validate against
    docType := xmlparser.getDoctype(p);
    xmlparser.setDoctype(p,docType);
    xmlparser.freeParser(p);
    The problem I am having is that the output now looks like this
    <?xml version="1.0" encoding="UTF-8"?>
    <My_Data>
    </My_Data>
    <!DOCTYPE My_Data SYSTEM "file:/c:/temp/v109.dtd">
    The xmlparser.parseDTD requires as the third parameter the root element so the !DOCTYPE field comes after the root element and not before as required.
    Hope this code helps a bit and if you solve the problem please let me know
    Owen
    null

  • PL/SQL parser creation

    Hi,
    I have to create a parser for PL/SQL 8i.
    Any help on what to start with would be very helpful.
    I hope to use the EBNF rules for the parsing. Am I in the right direction?
    Are there any open source code for PL/SQL parser ?
    Thanks & Regards
    Aswin Asokan

    Hi,
    I have to create a parser for PL/SQL 8i.
    Any help on what to start with would be very helpful.
    I hope to use the EBNF rules for the parsing. Am I in the right direction?
    Are there any open source code for PL/SQL parser ?
    Thanks & Regards
    Aswin Asokan The direction is right as far as I know but the task
    is really difficult. PL/SQL's syntax is inherited
    from ADA language which is BIG one and very complex to parse.
    And there is SQL part as well. Just look at the
    market - so few products are based on this kind
    of parser (PL/SQL) - as I can guess.
    For example:
    Formatter Plus (www.quest.com),
    ClearSQL (www.clearsql.com),
    CAST PL/SQL Analyzer (www.castsoftware.com),
    LECCO SQL Expert for Oracle (www.leccotech.com ) - as I can assume but I'm not sure.
    Probably you may search the net for a little subset of this
    parser - for ANSI SQL or for ADA to start with.

Maybe you are looking for

  • Calling cl_crm_documents= get_with_file in Interaction Center (BSP) failes

    Hallo, I am trying to import an Word-Document from the SAP Content Management System(CMS) to a folder on the CRM-Server. The call of the method cl_crm_documents=>get_with_file fails if calling in a BSP-Aplication. The same call from a ABP Report is s

  • HTTP Timeout 500

    Hello to all, we've got a sychronous szenario RFC <> XI <> JDBC. Sometimes I get the following exception: "com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 500 : Timeout." I've set the icm parameter to SAP recommandation. ic

  • Memory Frequency-DRAM Clock (MHz)

    Hi, I have a 875P Neo LSR with a P4 2.4GHz C 800MHz and 512 MB(1) Corsair XMS3200 OEM. The memory defaults to PC2700 as it was made befor the JDEC value was official. When I set the DRAM Frequency to 200MHz and reboot it stays at 200 MHz but the DRAM

  • Sharing a dvd studio pro project

    I have a co-worker that recently move to the United States. He works independent for the same company that I am working. We both use Final Cut Studio for our work and it is easy if we both have the same projects with the same raw video so he can do a

  • Invalid B-tree node size (3,0) error - what is it??

    Yesterday I had a HDD issue on my iMac (OSX 10.5) with an 'invalid node structure' error. I eventually managed to boot into 'single user mode' and used #fsck_hfs -rf /dev/disk0s2 at the command prompt. This got OSX up and running properly again. I th