TKPROF / Trace Issue

Hi,
We are using Oracle Apps 11.5.10 ; Database 10 g
In Oracle Apps; When we switch on trace (using Help --> Diagnostice --> Trace - Trace with Binds and waits ); Trace is getting generated successfully at unix box.
After switch off trace; connected to unix box and issued tkprof
Syntax:
tkprof <generated_trace_file> MYFILE sys=no explain=<apps>/<appspwd> sort=exeela,prsela,fchela
My Questions/ Issues are:
1. In the genreated tkprof file (MYFILE) ; I could see all select statement; But in the select statements ; few details are appearing as :B1 , :B2 (Example: SELECT CATEGORY, SEVERITY, FND_LOG_SEVERITY
FROM FND_NEW_MESSAGES WHERE MESSAGE_NAME = :B1 AND APPLICATION_ID = :B2); Is it way i can also see actual values instead of :B1 and :B2 ?
2. Also in my tkprof generated file (MYFILE); I have some ORA error; this error is at many places;
Here is the error details
----------------------------- error details --------------------------------------
Optimizer goal: ALL_ROWS
Parsing user id: 173 (APPS) (recursive depth: 2)
unable to set optimizer goal
ORA-01986: OPTIMIZER_GOAL is obsolete
parse error offset: 33
--------------------------- error details ---------------------------------------------------
3. I am using tkprof and trace in wrong manner ? Do i need to do any database settings to get correct results of my tkprof results? Is i am using different version of tkprof?
FYI ; few details on tkprof
-------------------- tkprof details -----------------------------------------------
TKPROF: Release 8.0.6.3.0 - Production on Wed Jan 23 21:18:31 2008
(c) Copyright 1999 Oracle Corporation. All rights reserved.
$
$ which tkprof
~/806/bin/tkprof
------------------------------ tkprof details ---------------------------------------------
Please help this is kind of priority.
Thanks!!

Suppose you see the following SQL in the tkprof output:
SELECT DISTINCT SR_CATEGORY_ID
FROM
MSC_ITEM_CATEGORIES WHERE CATEGORY_SET_ID = :b1 AND CATEGORY_NAME = :b2
call count cpu elapsed disk query current rows
Parse 2 0.00 0.75 0 0 0 0
Execute 2 0.02 1.93 0 0 0 0
Fetch 3 0.00 0.00 0 27 0 2
total 7 0.03 2.68 0 27 0 2
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 47 (APPS)
Rows Row Source Operation
1 HASH UNIQUE (cr=13 pr=0 pw=0 time=325 us)
14 PARTITION RANGE ALL PARTITION: 1 2 (cr=13 pr=0 pw=0 time=251 us)
14 TABLE ACCESS BY LOCAL INDEX ROWID MSC_ITEM_CATEGORIES PARTITION: 1 2 (cr=13 pr=0 pw=0 time=229 us)
14 INDEX RANGE SCAN MSC_ITEM_CATEGORIES_N4 PARTITION: 1 2 (cr=3 pr=0 pw=0 time=42 us)(object id 382162)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 HASH (UNIQUE)
14 PARTITION RANGE (ALL) PARTITION: START=1 STOP=2
14 TABLE ACCESS MODE: ANALYZED (BY LOCAL INDEX ROWID) OF
'MSC_ITEM_CATEGORIES' (TABLE) PARTITION: START=1 STOP=2
14 INDEX MODE: ANALYZED (RANGE SCAN) OF
'MSC_ITEM_CATEGORIES_N4' (INDEX) PARTITION: START=1 STOP=2
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 9 0.00 0.00
SQL*Net message from client 9 0.02 0.04
latch: library cache 1 0.00 0.00
If you want to find the bind variables, you need to find the SQL statement in the raw trace file. I would search on 'MSC_ITEM_CATEGORIES'
You see PARSING IN CURSOR #99 in the example below. The BIND #99 are listed below as well. The first one is 2 and the second is 'COMPUTER.DESKTOP'
PARSING IN CURSOR #99 len=111 dep=0 uid=47 oct=3 lid=47 tim=1138043781487272 hv=62812132 ad='650d6fec'
SELECT DISTINCT SR_CATEGORY_ID FROM MSC_ITEM_CATEGORIES WHERE CATEGORY_SET_ID = :b1 AND CATEGORY_NAME = :b2
END OF STMT
PARSE #99:c=4001,e=752066,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=1138043781487264
WAIT #99: nam='SQL*Net message to client' ela= 2 driver id=1952673792 #bytes=1 p3=0 obj#=49254 tim=1138043781488132
WAIT #99: nam='SQL*Net message from client' ela= 197 driver id=1952673792 #bytes=1 p3=0 obj#=49254 tim=1138043781488367
WAIT #99: nam='latch: library cache' ela= 1185 address=1866426996 number=214 tries=1 obj#=49254 tim=1138043781741163
BINDS #99:
kkscoacd
Bind#0
oacdty=02 mxl=22(21) mxlc=00 mal=00 scl=00 pre=00
oacflg=01 fl2=1000000 frm=00 csi=00 siz=56 off=0
kxsbbbfp=b6d0d710 bln=22 avl=02 flg=05
value=2
Bind#1
oacdty=01 mxl=32(16) mxlc=00 mal=00 scl=00 pre=00
oacflg=21 fl2=1000010 frm=01 csi=871 siz=0 off=24
kxsbbbfp=b6d0d728 bln=32 avl=16 flg=01
value="COMPUTER.DESKTOP"
Then run the following SQL in sqlplus or sql developer:
SQL> SELECT DISTINCT SR_CATEGORY_ID
2 FROM MSC_ITEM_CATEGORIES
3 WHERE CATEGORY_SET_ID = 2
4 AND CATEGORY_NAME = 'COMPUTER.DESKTOP';
SR_CATEGORY_ID
1373

Similar Messages

  • Explain Plan from TKPROF trace file.

    Hello,
    My procedure is taking time for that i have trace on in procedure fo find explain plan of particular query.
    Using below statement Trace is on.
       EXECUTE IMMEDIATE 'ALTER SESSION SET SQL_TRACE = TRUE';
       EXECUTE IMMEDIATE 'ALTER SESSION SET TIMED_STATISTICS = TRUE';Now for getting expalin plan from TKPROF i have used below statement but for some query i have found explain paln and some case i cant found explain plan.
    tkprof mf_ora_23773.trc mf_ora_23773.txt explain =abc/abc
    can u please help me to analyze where i m wrong?
    Thanks.

    First of all, you should best avoid using the explain= clause on the tkprof command line.
    This will run explain plan on the statement in the trace file, and that explain plan can even be wrong, as there is no information on datatypes in the trace file.
    The real explain plan data is flushed to the trace file, when the program issues commit or rollback. Oracle always issues an implicit commit when the program disconnects, so when you run the program to completion you should have explain plan output in your trace files.
    You won't get explain plan output if you don't have access to the objects in the SQL statement. Also recursive SQL won't produce explain plan result.
    One would need to see part of your trace file to verify your assertion the explain clause doesn't always work.
    Sybrand Bakker
    Senior Oracle DBA

  • Simple question (Trace issue) Access of undefined property

    Having a strange issue with my new Flash Builder and the trace command. Anyone seen this before and why?
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
         <fx:Declarations>
               <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
    <fx:Script>
         <![CDATA[
              var myString:String = "Help";
              trace(myString);
              //Error 1120: Access of undefined property myString.
         ]]>
    </fx:Script>
    </s:Application>

    your trace command isn't in a function
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"          
                   xmlns:s="library://ns.adobe.com/flex/spark"          
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" applicationComplete="doThis()">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                private var myString:String = "Help";
                private function doThis():void
                    trace(myString);
            ]]>
        </fx:Script>
    </s:Application>

  • Layer Auto-trace issue in AE CC 2014

    Hello,
    There seems to be a bug in the CC 2014 auto-trace layer command.  When I execute the command the new traced layer does not appear in the comp above the original layer as it did in AE CC previously.  Is there a new method?  I also notice that the project and effects panels are no longer displayed side by side in CC 2014.  I must switch between work-spaces in order to see the effects window on a given layer, then switch back to standard workspace to see the project panel.
    Any help or education on these matters would be appreciated.
    Thanks,
    JB

    Nothing changed regarding the default workspaces. I think that you may be mis-remembering the previous versions.
    Also, regarding Auto-trace, nothing has changed. There is an option in the Auto-trace dialog box to apply the masks to a new layer. The default for that is off. After Effects remembers and uses the last setting, so if you set this on once, it stays on for subsequent uses. You probably changed it once in a previous version and forgot that you did so.

  • Hi Shanky , pls help out regading Profiler Trace issue ?

    Hi Shanky,
    Pls help out . Regadng Profiler Trace .
    Thanks
    Vijay

    select id,path,status from sys.tarces
    which is given o/p for path "NULL" value
    The NULL path indicates a rowset (Profiler) trace rather than a server-side trace.  The status 1 means the trace is currently running.  You can run sp_who2 to identify the host(s) running the trace.  The Program Name will start with "SQL Server
    Profiler".
    Note that traces are at the server-level rather than the database level from SQL Server perspective.  Each trace may contain filters so that only events for specific databases are included.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Trace Issues

    If I try a trace on a website which is allowed (say www.bbc.co.uk - News is allowed for all users/access policies) with a specific user whose group membership gets listed successfully and click trace, I get the following:
    URL Check
    Object Size: 243 bytes
    MIME-Type: text/html
    Policy Match
    Decryption policy: None
    Routing policy: Global Routing Policy
    Access policy: Global Access Policy
    Final Result
    Request completed
    Details: Transaction permitted
    Trace session complete
    However if I keep the user the same, but change the URL to something that is not permitted (say, www.sex.com - Adult is blocked for all access policies), I get this:
    URL Check
    Object Size: 187 bytes
    MIME-Type: text/html
    Policy Match
    Decryption policy: None
    Routing policy: Global Routing Policy
    Access policy: Global Access Policy
    Final Result
    Request completed
    Details: Transaction permitted
    Trace session complete
    If we change the IP to one that is in a specific access group, it is listed as blocked:
    URL Check
    URL Category: Adult/Sexually Explicit
    WBRS Score: 3.0
    Policy Match
    Decryption policy: None
    Routing policy: None
    Access policy: Bypass_IP
    Final Result
    Request blocked
    Details: Request blocked based on predefined URL category
    Trace session complete
    What's going on?! The website is actually blocked, but why doesn't the trace say so?

    I believe i have had something similar,
    For me it was having multiple groups returned as "Authorised Groups" and the workaround for me was to remove all the other groups that are returned except the one I want to test for (i.e. that matches the access policy) and it appears to work

  • Auto trace issues

    when i used auto trace tool it is not showing the tracing of the pic

    After Effects Auto Trace does not work like the Auto Trace In Illustrator. There is a preview but there's a bug in the preview of you are running a HR (Retina for Mac) display that causes the preview to be 1/4 size and in the upper right corner. Your layer either needs an alpha channel or some contrast. This is what CC looks like on my MBP R with preview on:
    As long as you have not hidden the preview in your Composition Panel Settings you should be able to see the preview and if the Mask Path visibility is turned on (third icon on the bottom right) you should see the mask paths with they are created.

  • How to trace the SQL statements executed in a database

    I am using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production on a sun server and I am not familiar with Oracle but with MS SQL there is a tool called profiler, it allows you to monitor and see what is going on in a specific databases whether it is SQL statement executins or anything else. I have installed the oracle enterpise manager console at my windows client and I tried to look for a tool similar to the profiler in the MS SQL. I tried the TRACE DATA VIEWER and I inputed the login credentials but I don' t actually know the service name and I am getting an error ORA-12514 The TSN listener can not resolve the service name given in the connect descriptor. Therefore, am I on the right road so i have to look for the service name or are there any other ways i can trace the currently executing SQL statement in a specific database. I am really stuck there. I would appreciate if somebody help me out. Thanks
    Abdel Moalim

    Abdel Moalim wrote:
    I am using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production on a sun server and I am not familiar with Oracle but with MS SQL there is a tool called profiler, it allows you to monitor and see what is going on in a specific databases whether it is SQL statement executins or anything else. I have installed the oracle enterpise manager console at my windows client and I tried to look for a tool similar to the profiler in the MS SQL. I tried the TRACE DATA VIEWER and I inputed the login credentials but I don' t actually know the service name and I am getting an error ORA-12514 The TSN listener can not resolve the service name given in the connect descriptor. Therefore, am I on the right road so i have to look for the service name or are there any other ways i can trace the currently executing SQL statement in a specific database. I am really stuck there. I would appreciate if somebody help me out. Thanks
    Abdel MoalimHi
    I see others have answered the network connectivity issues, I'll try and address the tracing issue. Your best bet is to review http://www.petefinnigan.com/ramblings/how_to_set_trace.htm for the many ways in which a sessions SQL and indeed other activity can be traced. In version 7 (which I'm guessing is yours from the sid) the only profiler available was tkprof (Trace Kernel Profiler) which will do a good job of analysing your trace file. The trace files themselves are generated on the server in a protected directory so you may need to ask your dba for access to them. There are other profilers around now (I have one which runs in v9 and higher database at http://www.niall.litchfield.dial.pipex.com/SimpleProfiler/SimpleProfiler.html which will analyse your files for example) but tkprof is the start point - or else just reading the trace file in a text editor. There is also a utility written by the Oracle Apps guys trcanalyzer that will do a good job for you. In general the interface is poor compared with the ms utility but the information is deeper and more helpful
    Niall Litchfield
    http://www.orawin.info/

  • External portal capturing internal portal URL in Log and trace file

    Hi,
    We are facing one issue in portal like we have two portals for internal (Intranet) and external (Internet) users.
    Once users logged in the application and try to get the information about mylink from the external portal link (internet) they should not get any information about the internal portal.
    But in log and trace file we can see the external portal link capturing the internal portal URL.
    We need to find, from where system capturing the internal portal URL.
    Thanks.

    The tkproffed trace file is in seconds.
    "set timing" is in hh:mi:ss.uu format. So 00:00:01.01 is 1.01 seconds.
    You have to remember that most of these measurements are rounded. While your trace file says it contains one second of trace data, you know it's more.
    One excellent resource for trace files is "Optimizing Oracle Performance" by Cary Millsap & Jeff Holt. (http://www.amazon.com/Optimizing-Oracle-Performance-Cary-Millsap/dp/059600527X ) I thought I knew trace files before, but this book brings your knowledge to a whole new level.
    There is also an excellent WP by Cary Millsap ( http://method-r.com/downloads/doc_details/10-for-developers-making-friends-with-the-oracle-database-cary-millsap ) that gives you some insight.

  • Errors in TKPROF

    Hi,
    I have generated a trace file as per metalink note "453527.1 How To Trace a Concurrent Request And Generate TKPROF File".
    Now when I run tkprof as per the metalink note, I am getting strange errors as follows:
    ~~~~~~~~~~~~~~~~~~~~~
    /XXX/products/10.2.0/admin/XXX_porud360/udump/XXX_ora_12976158_VBORKAR_CR3298681.trc: 0403-006 Execute permission denied.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[3]: admin: 0403-006 Execute permission denied.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[5]: EXEC: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[6]: =====================: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[7]: PARSING: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[8]: alter: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[9]: END: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[10]: PARSE: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[11]: EXEC: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[12]: EXEC: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[13]: =====================: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[14]: PARSING: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[15]: SELECT: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[16]: END: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[17]: PARSE: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[18]: BINDS: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[19]: kkscoacd: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[20]: Bind#0: not found.
    XXX_ora_12976158_VBORKAR_CR3298681.trc[21]: 0403-057 Syntax error at line 21 : `(' is not expected.
    ~~~~~~~~~~~~~~~~~~~~~
    NOTE: Here I have replaced instance name with 'XXX'.
    If somebody knows about it, please let me know.
    Thanks and Regards
    Vivek

    Hi Hussein,
    Thanks for prompt reply!
    I am using following command:
    $tkprof <trace file name>.trc <output file>.out explain=apps/<password>
    I am running this command from unix. What do you mean by "sourcing the database env file"?
    I have read/write permission on the 'user_dump_dest' directory. But what do you mean by "oracle user have read/write permission"? Is it something different from unix permissions?
    I am getting same issue for couple of trace files.
    Hope you help me resolve this.
    Thanks
    Vivek

  • Enable Trace for the Session Loggied in..

    Hi All,
    How to enable trace for the session logged in with out db bounce.
    after enable how to stop and how to get the trace file in readable format.
    Please suggest
    Thanks
    Mano

    Trace a session.
    1)Logout all sessions from the database
    2)Login to application (ensure that only one session is available)
    3)sqlplus trace/trace
    Schema which has privilege to trace the session
    4)check the sid and serial# of the session from v$session
    Use the following query
    SQL> select username,to_char(logon_time,'DD-MON-YYYY HH:MI:SS') from v$session where username='<db username>' order by logon_time;
    SQL>exec sys.dbms_system.set_sql_trace_in_session(sid,serial#,TRUE);
    5)now execute the report/transaction.
    6)once the activity is over
    SQL>exec sys.dbms_system.set_sql_trace_in_session(sid,serial,FALSE);
    7)Now the trace file will be available in the udump folder of the database ip
    Userid/password: trace/trace
    The trace wil be available in /oracle/admin/orcl/udump
    8)To find the name of the trace file use the below query
    select spid from v$process where addr=(select paddr from v$session where sid=<enter the SID>);
    This will give the name of the file
    If you are not able to identify the trace file then please remove all files in udump before starting trace.
    9) ftp the trace fil to ur local pc and issue the tkprof command
    TKPROF <trace file (like D:\orcl_8853.trc)> D:\trace.txt explain=Oracle username/password (application user) sort=(prsela,exeela,fchela)
    This will give trace file in readable format(you need to have 10g client on your pc for tkprof to work)

  • Schema level trace

    HI all,
    Is it possible to trace every sessions within schema in Oracle 10g R2?
    Thanks
    Ken

    Hi, use the following for tracing a particular session of a schema
    1)sqlplus system/system@orcl
    2)check the sid and serial# of the session from v$session
    Use the following query to find out which sesssion you want to trace
    SQL> select username,to_char(logon_time,'DD-MON-YYYY HH:MI:SS') from v$session where username='<db username>' order by logon_time;
    SQL>exec sys.dbms_system.set_sql_trace_in_session(sid,serial#,TRUE);
    3)now execute the report/transaction.
    4)once the activity is over
    SQL>exec sys.dbms_system.set_sql_trace_in_session(sid,serial,FALSE);
    5)Now the trace file will be available in the udump folder of the database
    The trace wil be available in $oracle_home/admin/orcl/udump
    6)To find the name of the trace file use the below query
    select spid from v$process where addr=(select paddr from v$session where sid=<enter the SID>);
    This will give the name of the file
    If you are not able to identify the trace file then please remove all files in udump before starting trace.
    7) copy the trace file to ur local pc and issue the tkprof command
    TKPROF <trace file (like D:\orcl_8853.trc)> D:\trace.txt explain=Oracle username/password (application user) sort=(prsela,exeela,fchela)
    This will give trace file in readable format(you need to have oracle client on your pc for tkprof to work)

  • Enable awr and tkprof for particular sid

    Hi all,
    how to enable awr and tkprof for particular sid.
    it is very urgent
    Thanks
    mano

    Trace a session.
    1)Logout all sessions from the database
    2)Login to application (ensure that only one session is available)
    3)sqlplus trace/trace@026
    4)check the sid and serial# of the session from v$session
    Use the following query
    SQL> select username,to_char(logon_time,'DD-MON-YYYY HH:MI:SS') from v$session where username='<db username>' order by logon_time;
    SQL>exec sys.dbms_system.set_sql_trace_in_session(sid,serial#,TRUE);
    5)now execute the report/transaction.
    6)once the activity is over
    SQL>exec sys.dbms_system.set_sql_trace_in_session(sid,serial,FALSE);
    7)Now the trace file will be available in the udump folder of the database ip 10.44.0.26
    Userid/password: trace/trace
    The trace wil be available in /oracle/admin/orcl/udump
    8)To find the name of the trace file use the below query
    select spid from v$process where addr=(select paddr from v$session where sid=<enter the SID>);
    This will give the name of the file
    If you are not able to identify the trace file then please remove all files in udump before starting trace.
    9) ftp the trace fil to ur local pc and issue the tkprof command
    TKPROF <trace file (like D:\orcl_8853.trc)> D:\trace.txt explain=Oracle username/password (application user) sort=(prsela,exeela,fchela)
    This will give trace file in readable format(you need to have 10g client on your pc for tkprof to work)

  • Prepared=True Not working. Parse:Execute ration is one in tkprof report

    Hello,
    DB Version 9.2.0
    OS NT
    Provider: OraOLEDB 9.2.0.1.0
    I have a small .NET application. I use bind variables all overe my application. But my parse:execute ratio is 1 for some of all SELECT statements. There are many softparses in my application. I have also set session_cached_cursors.
    While using ADODB command object I set the "Prepared" parameter to true. But even though
    there are many parses.
    Heres is the simple block of code ..
    strCmd = "SELECT DISTINCT TO_CHAR(exp_date,'Month') Months, " _
    TO_CHAR(exp_date,'MM') MM FROM expenses ORDER BY MM"
    cmd1 = New ADODB.Command()
    cmd1.ActiveConnection = cConn
    cmd1.CommandText = strCmd
    cmd2 = New ADODB.Command()
    cmd2.ActiveConnection = cConn
    cmd2.CommandText = strCmd
    cmd2.Prepared = True
    For intLoop = 1 To 4
    cmd1.Execute()
    Next intLoop
    For intLoop = 1 To 4
    cmd2.Execute()
    Next intLoop
    Heres the tkprof trace output
    SELECT DISTINCT TO_CHAR(exp_date,'Month') Months, TO_CHAR(exp_date,'MM') MM
    FROM
    expenses ORDER BY MM
    call count cpu elapsed disk query current rows
    Parse 8 0.00 0.00 0 0 0 0
    Execute 8 0.04 0.06 0 0 0 0
    Fetch 8 0.01 0.01 0 56 0 226
    total 24 0.06 0.07 0 56 0 226
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 62
    Rows Row Source Operation
    23 SORT ORDER BY
    23 TABLE ACCESS FULL EXPENSES
    Logically it should be one parse and 8 execution. Will anybody please suggest me, how do I minimise the number of parses?
    Thanks in advance
    Sameer

    "db file parallel read" is likely to be associated with something like index prefetching.
    See:
    http://www.freelists.org/post/oracle-l/RE-Calculating-LIOs,11
    http://aprakash.wordpress.com/2012/05/29/index-range-scan-and-db-file-scattered-read-as-session-wait-event/
    http://jonathanlewis.wordpress.com/2006/12/15/index-operations/
    Tune the SQL.
    Review the execution plan.
    Check whether the statistics are accurate.
    Review whether the index hint (and others that we can't see) is appropriate.

  • Fetch phase in a trace file

    Oracle version: 11.2.0.3.0 Enterprise Edition
    OS - IBM/AIX RISC System/6000
    I am trying to generate a trace file from a piece of code executed by java server. What I asked the java developer to do is to place this block immediately after establishing a connection:
    BEGIN
      EXECUTE IMMEDIATE 'ALTER SESSION SET TRACEFILE_IDENTIFIER = ''M1''';
      dbms_monitor.session_trace_enable(waits => FALSE, binds => TRUE);
    END;And at the end of the logical java block of code:
    BEGIN
      dbms_monitor.session_trace_disable;
    END;What I want to know is how many rows the java server fetches after executing one particular select statement, because they complain about receiving less in count rows from the select statement than expecting.
    For example, if I execute the same sql query in sqlplus session, then I fetch let's say 1000 rows.
    When the same query is executed from java side, the fetched rows are less in count, let's say 500.
    And because I doubt it, I wanted to trace to see what actually is executed and how.
    From the excerpt of the trace file I see exactly the same query which I execute myself in a sqplus session.
    There is no fine-grained control on the udnerlying tables in the query.
    And my question is, how to interpret the FETCH phase of the cursor (for the select statement)?
    For example, if I see one FETCH for this cursor, does this mean that the java server has fetched only one row?
    If I see 100 FETCHes, does this mean they fetched 100 rows from the cursor?
    Here is a short excerpt from the trace file (please don't crucify me for the query and the obvious denormalized design of the tables, this is not invented by me):
    PARSING IN CURSOR #4573587152 len=667 dep=0 uid=737 oct=3 lid=737 tim=17685516462413 hv=954980718 ad='70000006d3e4940' sqlid='69pm96nwfrqbf'
    select /* ordered */ o.id, nvl(o.par_id, -1) as par_id, o.NAME_GER, o.NAME_ENG, o.NAME_ESP, o.NAME_ITL,o.NAME_FRA, decode(lo.lflag, 'Y', 'L', 'N') as leaf_or_node, lo.distance + 1 as "LEVEL",  to_char(o.beg_date, 'DD.MM.YYYY HH24:MI:SS'),  o.mais_id, l.path, nvl(o.non_selectable, 'N')  from   st_prod o, lprod_new l, lprod lo where  o.end_date = to_date('31.12.3999', 'DD.MM.YYYY') and   (lo.id, lo.beg_date) in (select id, beg_date from st_prod where par_id is null and end_date = to_date('31.12.3999', 'DD.MM.YYYY')) and   lo.lid = o.id and lo.lid_beg_date = o.beg_date and   l.st_prod_id = o.id and l.st_prod_beg_date = o.beg_date order by lo.distance, o.name_ger
    END OF STMT
    PARSE #4573587152:c=31,e=152,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=2027551050,tim=17685516462412
    EXEC #4573587152:c=80,e=375,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=2027551050,tim=17685516462936
    *** 2013-03-11 11:28:09.122
    FETCH #4573587152:c=519446,e=892645,p=0,cr=113446,cu=0,mis=0,r=10,dep=0,og=1,plh=2027551050,tim=17685517355715
    FETCH #4573587152:c=37,e=59,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=1,plh=2027551050,tim=17685517359109
    FETCH #4573587152:c=39,e=63,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=1,plh=2027551050,tim=17685517361128
    FETCH #4573587152:c=29,e=46,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=1,plh=2027551050,tim=17685517362849
    FETCH #4573587152:c=31,e=48,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=1,plh=2027551050,tim=17685517364621
    <162 more FETCH-es here>
    <STAT phase>
    CLOSE #4573587152:c=533,e=849,dep=0,type=1,tim=17685517671878Is it possible based on the trace file (if I have to change something in the way of tracing) to determine how many rows were fetched?

    Hi
    I read the traces into a table from the client from which I log and then read from the table If you can copy the content of the table column you are reading and paste it into a file say : your_trace_name.trc file then you can use this to generate a TKPROF trace fiile
    C:\>tkprof your_trace_file.trc your_trace_file.txt
    TKPROF: Release 10.2.0.3.0 - Production on Mon Mar 11 15:28:13 2013
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.To find the arraysize you are using then use this formula
    rows/Fetch = arraysizeFew details about interpreting TKRPOF exist here
    http://hourim.wordpress.com/2012/09/14/tuning-by-tkprof-a-case-study/
    Best regards
    Mohamed Houri

Maybe you are looking for

  • Additional Fields of an infotype in a overview screen??

    Dear Alls, I have a question. I m using recruitment module, i have added field in previous employment infotype 0023 but i want to maintain multiple data in this infotype. but this addiotional field is not diaplay in overview screen while it is in inf

  • Read-only system - how to get back to normal ?

    Two days ago, while I was trying to transfer data to an external hard-disk, my 12" iBook G4 suddenly turned down with no particular reason, and I cannot start it properly any longer. As I have absolutely no technical knowledge, I have no clue what to

  • Time Machine on a Network using a Drobo FS

    This is a question about using Time Machine from a Macbook Pro to a Drobo FS (ethernet only connection) over a network.  I have a Macbook Pro with Mac OS X 10.6.8, a Mac Mini Snow Leopard Server and a Drobo FS hard drive array.  I have set up the Dro

  • How do i get the CPU to run at full speed steadily?

    how may I get the S10's CPU to run at the full speed (near 1.6GHz) steadily? since the power scheme's fixed to be "Lenovo" and is only adjustable through its own energy management I'm not able to set the power scheme as "Always On" like how I may do

  • Reciving goods receipt using DTW

    HI All, we want to receive 10,000 serialized items using goods receipt PO using dtw. did any one tried using DTW. can you help us out how to do it.