Interpreting Trace File.
Hi i am using 10.2.0.4.0 version of oracle.
I am having trace file info as below, for one of the query. So how should i interpret the trace file? What is the issue in the query, and the scope of improvement in the query? please note that , i have removed the query and its plans from the trace file, i have only posted the wait sections.
call count cpu elapsed disk query current rows
Parse 1 0.14 0.13 0 0 1 0
Execute 1 6.63 162.12 33540 72921 383 0
Fetch 17272 178.89 1933.95 274835 3147603 20 259063
total 17274 185.66 2096.21 308375 3220524 404 259063
Misses in library cache during parse: 1
Optimizer mode: CHOOSE
Parsing user id: 36
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
control file sequential read 4 0.00 0.00
db file sequential read 302812 0.62 1913.89
latch: cache buffers chains 3 0.04 0.04
direct path write temp 501 0.01 0.30
SQL*Net message to client 17272 0.00 0.04
db file scattered read 120 0.02 0.63
direct path read temp 608 0.14 1.71
SQL*Net message from client 17272 44.81 31865.74
SQL*Net more data to client 15 0.00 0.00
latch: object queue header operation 1 0.00 0.00
latch: library cache 3 0.03 0.04
latch: library cache pin 1 0.00 0.00
latch: cache buffer handles 1 0.00 0.00
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.14 0.13 0 0 1 0
Execute 1 6.63 162.12 33540 72921 383 0
Fetch 17272 178.89 1933.95 274835 3147603 20 259063
total 17274 185.66 2096.21 308375 3220524 404 259063
Misses in library cache during parse: 1
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 17275 0.00 0.04
SQL*Net message from client 17274 75.57 31941.39
SQL*Net more data from client 2 0.00 0.01
db file sequential read 302812 0.62 1913.89
control file sequential read 4 0.00 0.00
latch: cache buffers chains 3 0.04 0.04
direct path write temp 501 0.01 0.30
db file scattered read 120 0.02 0.63
direct path read temp 608 0.14 1.71
SQL*Net more data to client 15 0.00 0.00
latch: object queue header operation 1 0.00 0.00
latch: library cache 3 0.03 0.04
latch: library cache pin 1 0.00 0.00
latch: cache buffer handles 1 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 11 0.02 0.01 0 0 0 0
Execute 348 0.20 0.17 0 0 1 0
Fetch 367 0.06 0.37 59 1187 0 3806
total 726 0.28 0.56 59 1187 1 3806
Misses in library cache during parse: 11
Misses in library cache during execute: 10
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 59 0.01 0.32
1 user SQL statements in session.
348 internal SQL statements in session.
349 SQL statements in session.
********************************************************************************
below is the estimate and actual results.
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | Reads | Writes | OMem | 1Mem | Us
ed-Mem | Used-Tmp|
|* 1 | COUNT STOPKEY | | 13475 | | 13475 |00:01:32.33 | 134K| 11357 | 0 | | |
| |
| 2 | NESTED LOOPS | | 13475 | 2 | 13475 |00:01:31.66 | 134K| 11357 | 0 | | |
| |
| 3 | NESTED LOOPS | | 13475 | 1 | 13475 |00:01:29.22 | 94325 | 11357 | 0 | | |
| |
|* 4 | INDEX RANGE SCAN | | 13475 | 1 | 13475 |00:00:26.63 | 40425 | 4014 | 0 | | |
| |
| 5 | TABLE ACCESS BY INDEX ROWID | | 13475 | 1 | 13475 |00:01:02.46 | 53900 | 7343 | 0 | | |
| |
|* 6 | INDEX RANGE SCAN || 13475 | 1 | 13475 |00:00:16.80 | 40425 | 2056 | 0 | | |
| |
|* 7 | TABLE ACCESS FULL | | 13475 | 2 | 13475 |00:00:02.26 | 40425 | 0 | 0 | | |
| |
| 8 | TABLE ACCESS BY INDEX ROWID || 94399 | 1 | 94399 |00:06:17.09 | 389K| 32207 | 0 | | |
| |
|* 9 | INDEX UNIQUE SCAN | | 94399 | 1 | 94399 |00:02:59.79 | 294K| 15488 | 0 | | |
| |
| 10 | TEMP TABLE TRANSFORMATION | | 1 | | 170K|00:35:11.08 | 1575K| 195K| 6158 | | |
| |
| 11 | LOAD AS SELECT | | 1 | | 1 |00:04:49.06 | 53704 | 28653 | 264 | 525K| 525K| 5
25K (0)| |
| 12 | PARTITION RANGE ALL | | 1 | 55430 | 16097 |00:06:26.06 | 53433 | 28651 | 0 | | |
| |
| 13 | PARTITION HASH ALL | | 54 | 55430 | 16097 |00:09:20.69 | 53433 | 28651 | 0 | | |
| |
|* 14 | TABLE ACCESS BY LOCAL INDEX ROWID | INV | 432 | 55430 | 16097 |00:06:11.42 | 53433 | 28651 | 0 | | |
| |
|* 15 | INDEX SKIP SCAN | | 432 | 125K| 16097 |00:00:39.90 | 4642 | 4508 | 0 | | |
| |
| 16 | TABLE ACCESS BY INDEX ROWID | | 1 | 2 | 170K|00:30:21.66 | 1522K| 166K| 5894 | | |
| |
| 17 | NESTED LOOPS | | 1 | 97 | 276K|34:55:49.92 | 1470K| 150K| 5894 | | |
| |
| 18 | NESTED LOOPS | | 1 | 55 | 105K|00:22:14.57 | 1128K| 134K| 5894 | | |
| |
| 19 | NESTED LOOPS OUTER | | 1 | 52 | 105K|00:16:32.91 | 694K| 105K| 5894 | | |
| |
|* 20 | HASH JOIN | | 1 | 52 | 105K|00:16:19.68 | 402K| 102K| 5894 | 9641K| 2205K| 16
27K (1)| 10240 |
| 21 | VIEW | | 1 | 65234 | 105K|00:16:16.46 | 402K| 101K| 4655 | | |
| |
| 22 | SORT UNIQUE | | 1 | 65234 | 105K|00:16:16.46 | 402K| 101K| 4655 | 8724K| 1161K| 61
8K (48)| 9216 |
| 23 | UNION-ALL | | 1 | | 105K|00:14:59.93 | 402K| 97342 | 252 | | |
| |
| 24 | NESTED LOOPS OUTER | | 1 | 19975 | 105K|00:14:10.24 | 395K| 94655 | 0 | | |
| |
| 25 | NESTED LOOPS | | 1 | 19975 | 105K|00:13:58.47 | 140K| 93616 | 0 | | |
| |
| 26 | VIEW | | 1 | 55430 | 16097 |00:00:00.43 | 270 | 531 | 0 | | |
| |
| 27 | TABLE ACCESS FULL | | 1 | 55430 | 16097 |00:00:00.19 | 270 | 531 | 0 | | |
| |
|* 28 | TABLE ACCESS BY INDEX ROWID| | 16097 | 1 | 105K|00:13:59.70 | 140K| 93085 | 0 | | |
| |
|* 29 | INDEX RANGE SCAN | | 16097 | 10 | 145K|00:00:40.42 | 32685 | 8237 | 0 | | |
| |
| 30 | TABLE ACCESS BY INDEX ROWID | | 105K| 1 | 84716 |00:00:16.78 | 254K| 1039 | 0 | | |
| |
|* 31 | INDEX UNIQUE SCAN | | 105K| 1 | 84716 |00:00:13.05 | 169K| 982 | 0 | | |
| |
| 32 | NESTED LOOPS | | 1 | 45259 | 0 |00:00:17.19 | 7336 | 2687 | 252 | | |
| |
|* 33 | HASH JOIN RIGHT OUTER | | 1 | 45259 | 0 |00:00:17.19 | 7336 | 2687 | 252 | 884K| 884K| 3
09K (0)| |
| 34 | TABLE ACCESS FULL | | 1 | 1673 | 1677 |00:00:00.01 | 24 | 8 | 0 | | |
| |
|* 35 | HASH JOIN | | 1 | 45259 | 0 |00:00:17.13 | 7310 | 2678 | 252 | 3318K| 1235K| 4
47K (1)| 2048 |
|* 36 | TABLE ACCESS FULL | | 1 | 45259 | 49043 |00:00:07.41 | 7043 | 2170 | 0 | | |
| |
| 37 | VIEW | | 1 | 55430 | 16097 |00:00:00.14 | 267 | 256 | 0 | | |
| |
| 38 | TABLE ACCESS FULL || 1 | 55430 | 16097 |00:00:00.12 | 267 | 256 | 0 | | |
| |
| 39 | TABLE ACCESS BY INDEX ROWID | | 0 | 1 | 0 |00:00:00.01 | 0 | 0 | 0 | | |
| |
|* 40 | INDEX UNIQUE SCAN | | 0 | 1 | 0 |00:00:00.01 | 0 | 0 | 0 | | |
| |
| 41 | VIEW | | 1 | 55430 | 16097 |00:00:00.02 | 267 | 0 | 0 | | |
| |
| 42 | TABLE ACCESS FULL | | 1 | 55430 | 16097 |00:00:00.01 | 267 | 0 | 0 | | |
| |
| 43 | TABLE ACCESS BY INDEX ROWID | | 105K| 1 | 93385 |00:00:24.90 | 291K| 2104 | 0 | | |
| |
|* 44 | INDEX UNIQUE SCAN | | 105K| 1 | 93385 |00:00:16.45 | 196K| 1405 | 0 | | |
| |
| 45 | TABLE ACCESS BY INDEX ROWID | | 105K| 1 | 105K|00:05:49.82 | 434K| 29495 | 0 | | |
| |
|* 46 | INDEX UNIQUE SCAN || 105K| 1 | 105K|00:02:54.37 | 328K| 14644 | 0 | | |
| |
|* 47 | INDEX RANGE SCAN | | 105K| 2 | 170K|00:03:01.14 | 342K| 15690 | 0 | | |
| |
Predicate Information (identified by operation id):
1 - filter(1>=ROWNUM)
4 - access("XS"."SITEPK"=:B1)
6 - access("XS"."VENDORPK"="XB"."VENDORPK")
7 - filter(("XB"."BUYERCOMPANYPK"="CC"."PARENTCOMPANYPK" OR "XB"."BUYERCOMPANYPK"="CC"."CHILDCOMPANYPK"))
9 - access("INVOICEPK"=:B1 AND "LINENUM"=:B2)
14 - filter(("IH"."INVOICEORIGIN"='APP' AND "IH"."PO_PK" IS NULL AND "IH"."ISPOSTED"='Y'))
15 - access("IH"."PAYPK"=3914297352 AND "IH"."POSTDATE">=1338508800000 AND "IH"."POSTDATE"<1341014400000)
filter(("IH"."POSTDATE">=1338508800000 AND "IH"."PAYPK"=3914297352 AND "IH"."POSTDATE"<1341014400000))
20 - access("NEWVIEW"."PRIMARYKEY"="TAB"."INVOICEPK")
28 - filter(TO_NUMBER("RAT"."AUDITTYPE")<2)
29 - access("INNERTAB1"."INVOICEPK"="RAT"."INVOICEPK")
filter("RAT"."INVOICEPK" IS NOT NULL)
31 - access("RAT"."USERPK"="UR"."USERPK")
33 - access("RA"."QUEUEPK"="Q"."QUEUEPK")
35 - access("INNERTAB2"."INVOICEPK"="RA"."INVOICEPK")
36 - filter(("RA"."INVOICEPK" IS NOT NULL AND "RA"."RECEIVERPK" IS NOT NULL))
40 - access("RA"."RECEIVERPK"="UR"."USERPK")
44 - access("TAB"."ENTEREDBY"="UR"."USERPK")
46 - access("TAB"."INVOICEPK"="ISUM"."INVOICEPK")
47 - access("IDD"."INVOICEPK"="TAB"."INVOICEPK")
87 rows selected.
Elapsed: 00:00:04.10
SQL>Edited by: 930254 on Aug 7, 2012 9:33 AM
Similar Messages
-
Hi everybody,
I need to know how to read and interpret information from a trace file .
Is there any third party utility to convert all the information into readable text format
so that it can be easily understood.
Please help
Altafhttp://www.oracle.com/pls/db102/to_URL?remark=ranked&urlname=http:%2F%2Fdownload.oracle.com%2Fdocs%2Fcd%2FB19306_01%2Fserver.102%2Fb14211%2Fsqltrace.htm%23PFGRF01020
and
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#PFGRF01010
You don't need a third party converter.
Message was edited by:
Lost_In_Transition -
Hi,
Can someone please tell me what is the meaning of stack number in the file generated ny dbms_trace. how to interpret the trace file.
Thanks in advance.
MathewHi,
The cause of an ORA-1555 is quite simple :
U start a long transaction (named T1) at time t1. Ur transaction T1 made lots of things such as
insert/update/delete, ...
At time t1, ur transaction T1 update a block named b1. This block is copied in the rolback segment with a "non commited" status in the block header. This "before image" of ur block cannot be deleted from the RBS cause of his "non committed" status.
Ur transaction T1 now commit the modifications => the header of the block b1 in the RBS is upadted with the status "commited". Once the block has the "commited" status, he can be removed from the RBS and Oracle may remove this one if he needs some space in the RBS for some other before image.
At time t2, another transaction (named T2) start and update some rows so T2 will need some space in the RBS and then erase the version of the block b1 (in the RBS).
At time t67 (some time after), ur transaction T1 (the long one) need to read again the block b1. But as T1 has been started at time t1, Oracle will search for an image of the block b1 at time t1 (to ensure read consistency). But, as transaction T2 erased this before image of the block b1, Oracle cant find it and send u the error ORA-01555...
To avoid ORA-015[i]Long postings are being truncated to ~1 kB at this time. -
Hey everyone,
We've been asked to "stress" and "load" test our application as it is predicted our user base might grow in the near future (company acquisitions/etc)...
Unfortunately, there is concern about the overhead added by APEX. From everything I've read, I do not personally believe APEX adds much to each page view (as compared to our own self-managed data), however I need to PROVE this to our system admins/etc. Simply referencing things on the internet like "APEX doesn't add much overhead" doesn't exactly make the case.
To accomplish my mission, I've done the following:
1) generated a trace file on a test page by appending the following to the end of the URL:
"&p_trace=YES" (without quotes)
2) found the location of trace files using:
select value from v$parameter where name = 'user_dump_dest';
3) found the exact trace file for my apex page view
grep -l "3853406964369" *.trc (where the number in quotes was the session id taken from my apex url)
4) formatted the trace file using tkprof from the linux command line:
tkprof orcl_ora_24115.trc tkprof_output
Now, I'm in the process of examining the file. It is great that it shows everything involved in generating a page! A couple of quick questions though.
A) is it safe to assume that this trace file (found by using my method above in steps 1-4) only contains records associated with my single apex page view? My fear is that just because a file contains my session id, that does not guarantee that other random stuff from other sessions is also in the same file (sorry i'm new to trace files and especially trace files generated by apex).
B) if i view a second page with the trace=YES, will a second file get generated or does it get combined into 1 file? how can i easily tell which file is for which page view?
C) is there an easy way to differentiate what queries would normally be made by oracle (regardless of the UI) versus queries ran by APEX specifically (which would not occur if we were using PHP for a front end)?
Specifically, I see queries (similar to the following) that do not appear to be APEX specific from what I can tell:
-- example 1 --
select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.flags,i.property,
i.pctfree$,i.initrans,i.maxtrans,i.blevel,i.leafcnt,i.distkey,i.lblkkey,
i.dblkkey,i.clufac,i.cols,i.analyzetime,i.samplesize,i.dataobj#,
nvl(i.degree,1),nvl(i.instances,1),i.rowcnt,mod(i.pctthres$,256),
i.indmethod#,i.trunccnt,nvl(c.unicols,0),nvl(c.deferrable#+c.valid#,0),
nvl(i.spare1,i.intcols),i.spare4,i.spare2,i.spare6,decode(i.pctthres$,null,
null,mod(trunc(i.pctthres$/256),256)),ist.cachedblk,ist.cachehit,
ist.logicalread
from
ind$ i, ind_stats$ ist, (select enabled, min(cols) unicols,
min(to_number(bitand(defer,1))) deferrable#,min(to_number(bitand(defer,4)))
valid# from cdef$ where obj#=:1 and enabled > 1 group by enabled) c where
i.obj#=c.enabled(+) and i.obj# = ist.obj#(+) and i.bo#=:1 order by i.obj#
-- example 2 --
select intcol#, toid, version#, intcols, intcol#s, flags, synobj#
from
subcoltype$ where obj#=:1 order by intcol# asc
and I see queries that are definitely APEX related (based on the existence of references to wwv objects):
-- example 3 --
SELECT ID, BRANCH_NAME, BRANCH_ACTION, BRANCH_POINT, BRANCH_TYPE,
BRANCH_CONDITION, BRANCH_CONDITION_TEXT, BRANCH_CONDITION_TYPE,
BRANCH_WHEN_BUTTON_ID, NVL(SAVE_STATE_BEFORE_BRANCH_YN,'N'),
SECURITY_SCHEME
FROM
WWV_FLOW_STEP_BRANCHES WHERE FLOW_ID = :B4 AND FLOW_STEP_ID = :B3 AND
BRANCH_POINT = 'BEFORE_HEADER' AND (REQUIRED_PATCH IS NULL OR
(REQUIRED_PATCH > 0 AND (:B2 IS NULL OR INSTR(:B2 ,
':'||TO_CHAR(REQUIRED_PATCH)||':') = 0) ) OR (REQUIRED_PATCH < 0 AND (:B1
IS NULL OR INSTR(:B1 ,':'||TO_CHAR(0-REQUIRED_PATCH)||':') = 0) ) ) ORDER
BY BRANCH_SEQUENCE, ID
and then of course it's easy for me to identify any queries that are based on our code because I recognize the object names we use.
In the mean-time I'm starting to look into how to interpret trace files (outside of the context of apex).
My biggest concern is that I do not want to "ding" or "tax" APEX for queries that it had nothing to do with and that would be ran by oracle regardless of the UI we use to "view a page".
Thanks!Move older audit files to a different filesystem until you find someone being able to define what files can be deleted.
Regards
Gustavo Restuccia -
Trace file errors interpretation
We are running Oracle 11.2.0.3 on a Windows 2008 R2 Server with an app server on the same. Our app has a search function that has recently started timing out on us. Sometimes intermittently but often now. I've ran a trace in our dev environment, below code, in an attempt to track down the issue but I'm finding very little useful information in relation to the errors I see in the trace file below. My experience in deciphering trace code is nill so I was hoping there would be someone out there who could elaborate a little on how they interpret these errors or provide a resource so I could do so myself. I appreciate any help provided.
*** 2013-04-18 14:27:23.353
*** SESSION ID:(3093.63097) 2013-04-18 14:27:23.353
*** CLIENT ID:() 2013-04-18 14:27:23.353
*** SERVICE NAME:(SYS$USERS) 2013-04-18 14:27:23.353
*** MODULE NAME:(w3pw.exe) 2013-04-18 14:27:23.353
*** ACTION NAME:() 2013-04-18 14:27:23.353
ERROR #532357120:err=1013 tim=1395332943283
=====================
PARSING IN CURSOR #532354152 len=911 dep=2 uid=66 oct=47 lid=66 tim=1395332944838 hv=4132741411 ad='2a92d9d60' sqlid='27dnt1rv59893'
declare
sel number;
arg0 VARCHAR2(1) := null;
begin
:1 := "CTXSYS"."TEXTOPTSTATS".ODCIStatsSelectivity(
sys.ODCIPREDINFO('CTXSYS',
'CTX_CONTAINS',
'TEXTCONTAINS',
32),
sel,
sys.ODCIARGDESCLIST(sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL), sys.ODCIARGDESC(5, NULL, NULL, NULL, NULL, NULL, NULL), sys.ODCIARGDESC(2, 'MV$SEARCH', 'CIPS', '"NAME"', NULL, NULL, NULL), sys.ODCIARGDESC(1, NULL, NULL, NULL, NULL, NULL, NULL)),
:3,
NULL
, arg0, :4,
sys.ODCIENV(:5,:6,:7,:8));
if sel IS NULL then
:2 := -1.0;
else
:2 := sel;
end if;
exception
when others then
raise;
end;
END OF STMT
PARSE #532354152:c=0,e=75,p=0,cr=0,cu=0,mis=0,r=0,dep=2,og=1,plh=0,tim=1395332944836
CLOSE #470004032:c=0,e=21,dep=3,type=1,tim=1395332945763
EXEC #532354152:c=0,e=1279,p=0,cr=9,cu=0,mis=0,r=0,dep=2,og=1,plh=0,tim=1395332946378
ERROR #532354152:err=1013 tim=1395332946406
ERROR #532979664:err=1013 tim=1395333014987
ERROR #548803376:err=1013 tim=1395333015201We ran a .NET trace on the Oracle client and got the below. The main issue is: "OpsSqlExecuteReader(): RetCode=-1"
TIME:2013/04/19-10:07:16:569 TID:116c OpsSqlPrepare2(): SQL: Begin SELX_MV$SEARCH.GET(:v0, :v1, :v2); End;
TIME:2013/04/19-10:07:16:569 TID:116c (ENTRY) OpsPrmAllocOpoPrmCtx()
TIME:2013/04/19-10:07:16:569 TID:116c (EXIT) OpsPrmAllocOpoPrmCtx(): RetCode=0 Line=258
TIME:2013/04/19-10:07:16:569 TID:116c (ENTRY) OpsPrmFillOpoPrmCtx()
TIME:2013/04/19-10:07:16:569 TID:116c (ENTRY) OpsConAddRef(): (4fc8dc0)=0
TIME:2013/04/19-10:07:16:569 TID:116c (EXIT) OpsConAddRef(): RefCount=23 RetCode=0 Line=2597 (4fc8dc0)=0
TIME:2013/04/19-10:07:16:569 TID:116c (EXIT) OpsPrmFillOpoPrmCtx(): RetCode=0 Line=540
TIME:2013/04/19-10:07:16:569 TID:116c (EXIT) OpsSqlPrepare2(): RetCode=0 Line=500
TIME:2013/04/19-10:07:16:569 TID:116c (ENTRY) OpsSqlExecuteReader(): (4fc8dc0)=0
TIME:2013/04/19-10:07:16:569 TID:116c (ENTRY) OpsDecGetValCtxFromInteger()
TIME:2013/04/19-10:07:16:569 TID:116c (EXIT) OpsDecGetValCtxFromInteger(): RetCode=0 Line=833
TIME:2013/04/19-10:07:16:569 TID:116c (ENTRY) OpsSqlAllocCtx(): (4fc8dc0)=0
TIME:2013/04/19-10:07:16:569 TID:116c (EXIT) OpsSqlAllocCtx(): RetCode=0 Line=128 (4fc8dc0)=0
TIME:2013/04/19-10:12:16:492 TID: dc (ENTRY) OpsErrAllocCtx(): (4fc8dc0)=0
TIME:2013/04/19-10:12:16:492 TID: dc (EXIT) OpsErrAllocCtx(): RetCode=0 Line=197 (4fc8dc0)=0
TIME:2013/04/19-10:12:16:539 TID:116c (ENTRY) OpsSqlFreeCtx()
TIME:2013/04/19-10:12:16:539 TID:116c (EXIT) OpsSqlFreeCtx(): RetCode=0 Line=153
TIME:2013/04/19-10:12:16:539 TID:116c (ENTRY) OpsSqlFreeCtx()
TIME:2013/04/19-10:12:16:539 TID:116c (EXIT) OpsSqlFreeCtx(): RetCode=0 Line=153
TIME:2013/04/19-10:12:16:539 TID:116c (EXIT) OpsSqlExecuteReader(): RetCode=-1 Line=612
TIME:2013/04/19-10:12:16:539 TID:116c (ENTRY) OpsTraceGetLastErrorCode()
TIME:2013/04/19-10:12:16:539 TID:116c (EXIT) OpsTraceGetLastErrorCode(): RetCode=0 Line=1425
TIME:2013/04/19-10:12:16:555 TID: dc (ENTRY) OpsTraceCreateMiniDump()
TIME:2013/04/19-10:12:16:555 TID: dc (EXIT) OpsTraceCreateMiniDump(): None created: TraceLevel=0 Line=1342
TIME:2013/04/19-10:12:16:586 TID:116c (EXCPT) Lvl0: (Type=System.Threading.ThreadAbortException) (Msg=Thread was being aborted.) (Win32Err=0) (Code=e0434f4d) (Stack= at Oracle.DataAccess.Client.OpsSql.ExecuteReader(IntPtr opsConCtx, IntPtr& opsErrCtx, IntPtr& opsSqlCtx, IntPtr& opsDacCtx, IntPtr& opsReaderErrCtx, IntPtr opsSubscrCtx, Int32& isSubscrRegistered, Int32 bchgNTFNExcludeRowidInfo, Int32 bQueryBasedNTFNRegistration, Int64& query_id, OpoSqlValCtx*& pOpoSqlValCtx, String pCommandText, OpoDacValCtx*& pOpoDacValCtx, IntPtr[] pOpoPrmValCtx, String[] ppOpoPrmRefCtx, OpoMetValCtx*& pOpoMetValCtx, Int32 NoOfParams)
at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior))Edited by: slas on Apr 19, 2013 12:19 PM -
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 -
Max wait from a trace file...what does it mean
Hi,
following is a part of an extended sql trace file :
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
library cache lock 5 0.00 0.00
row cache lock 7 0.00 0.00
library cache pin 3 0.00 0.00
rdbms ipc reply 2 0.00 0.00
SQL*Net message to client 8185 0.00 0.01
SQLNet message from client 8185 1671.98 1688.26*
here what does the column max.wait mean? this is a trace file when a proc was run remotely to a database - it has lots of dbms_output statements, it creates an output file (on the remote pc from which it runs) the proc calls several sql scrips, does lot of query and dml
Now when teh same script is run locally from the server those sql net waits are not there. and the interesting fact is: when run locally it takes 4 mins
and remotely it takes 1 hour. How can we interpret this? and what does teh max wait indiccate?
thanks,Can you explain more on this? the same proc when run locally does not have this wait and when run from remote ip it has this wait - so does that mean that this is due to network issue?
should we for example - remove the dbms_output statements from this and try ? what should we do to be able to run the script from remote ip and run it in 6-7 minutes- when the scritp is run locally from the from server it takes 4 minutes and from a remote ip it takes one hour. the script also has a spool statement as it has to log its output. Is it that spoling that may be causing this?
Thanks again,
Edited by: orausern on Jan 18, 2010 7:09 AM -
Does anyone have a solution to present the contents of trace files to a user? They need to ba able to view any trace file in the trace directory including alert log et.al. Mail doesn't seem practical since the files can be large and external tables require them to know the name of the trace file...Any slick ideas out there.
Thanks for the responses. I saw Millsap's tool but the requirement is for ANY trace file. These folks are excellent DBAs I have no concerns over their interpreting the contents however they have no access to the OS. I saw Mr. Kytes suggestion, which we are playing with, I was just wondering if there are any other solutions folks are using.
-
Diagnosing errors from Net Services trace files
Hi,
does anybody have a link to any documentation where it's explained how to interpret errors in Net Service trace files. For example, a snippet of a trace file looks like this:
[30-JUN-2009 14:32:39:302] nttcni: trying to connect to socket 1836.
[30-JUN-2009 14:32:40:224] ntt2err: entry
[30-JUN-2009 14:32:40:224] ntt2err: soc 1836 error - operation=1, ntresnt[0]=511, ntresnt[1]=61, ntresnt[2]=0
[30-JUN-2009 14:32:40:224] ntt2err: exitI suppose that ntresnt[1]=61 means means (from metalink DocId 67211.1):
WSAECONNREFUSED 61 10061
Connection refused. No connection could be made because the target machine
actively refused it. This usually results from trying to connect to a service
that is inactive on the foreign host.
But what about the other part:
operation=1, ntresnt[0]=511
Does anybody know what "operation" and the "511" code mean?
Thank you in advance for any answer.
Regards,
JureLook at metalink note 156485.1 "Examining Oracle Net Trace Files"
-
Hi,
i know the procedure to generate a tkprof for the trace file but i dont know wat are the things to be analysed and wat kind of action should be taken after analysing the trace file.Please say me the procedure about things to be analysed and action should be taken after analysing the contents from the trace file.
Regards
AramPl also see MOS Doc 760786.1 (TKProf Interpretation (9i and above) )
HTH
Srini -
Read the results shown in the trace files
Hi,
I have a question,
In oracle 10g or 11g, How can I interpret the results shown in the trace files?
ok I explain more ... when I enable the trace sql session , a trace file is created under user dump!
What 's the meaning of :
*1- PARSING IN CURSOR*
*2- tim= is it in Microseconds? Timestamp ? How can I convert it in seconds?*
*3- STAT*
*4- CLOSE*
*5- hv=*
*6- tim=*
*7- lid=*
*8-dep=*
PARSING IN CURSOR #2 len=104 dep=0 uid=0 oct=2 lid=0 tim=13651992547 hv=3760112805 ad='284c0e6c' sqlid='6shmgvbh1xj55'
INSERT INTO employee(ID,NAME,department_id, DEPARTMENT_SUB_ID) VALUES(10002, 'employee', 12, 0)
END OF STMT
PARSE #2:c=93750,e=102539,p=24,cr=471,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=13651992547
EXEC #2:c=0,e=0,p=5,cr=1,cu=7,mis=0,r=1,dep=0,og=1,plh=0,tim=13651992547
STAT #2 id=1 cnt=0 pid=0 pos=1 obj=0 op='LOAD TABLE CONVENTIONAL (cr=1 pr=5 pw=0 time=0 us)'
CLOSE #2:c=0,e=0,dep=0,type=0,tim=13652013059Thnak you a lot guys,
Smith794130 wrote:
Thank you,
Sorry, I am new in Oracle and I want to get things really clear (something that is diifficult I think)
When an end user submit a query, one user process communicates the query to a server process.
The server process analyse the syntax and the symentic of the query, this known as the parse process.
The syntax of the query and the tables, columns are verified against the database buffer cache.
One PGA is allocated to store the query.
The server process read from the datafile and gets the results and store it into the shared pool.
The result is then back to the user process and then to the end user
Is it correct ?
Thank you all,
SSome of the above concepts are close. There is a nice description in the Oracle Database Concepts guide of what happens during the processing of a SQL statement (see the stages listed in the documentation):
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/sqlplsql.htm#sthref3460
It is probably a good idea to distinguish between a hard parse, a soft parse, and a session cursor cache hit:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/glossary.htm#sthref1591
The database buffer cache is not used to verify the validity of SQL statements, but instead as a means to reduce the number of disk accesses that are required to return a query result to a client computer.
One or more pieces of PGA memory may be used simultaneously while processing a SQL statement. I have a couple of blog articles that show multiple PGA memory allocations in use at the same time.
The server process may not need to access a physical data file to return the query results to a client computer, depending of course on the current contents of the buffer cache.
I recommend that you wait a while before trying to work with 10046 trace files. Right now the contents are probably providing too much detail for you, although I definitely recommend that you return to working with 10046 trace files at a later time. A good starting point is either the free Database Concepts Guide:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220.pdf
or Tom Kyte's "Expert Oracle Database Architecture: Oracle Database Programming 9i, 10g, and 11g Techniques and Solutions, Second Edition" book. You can read my review of that book on Amazon's website:
http://www.amazon.com/Expert-Oracle-Database-Architecture-Programming/dp/1430229462/ref=dp_ob_title_bk
Charles Hooper
Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
http://hoopercharles.wordpress.com/
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
How to read trace file content
Hi,
DB :11.2
How to read trace file content.It's only for ORACLE SUPPORT?
calling
call
entry
argument values in hex
location
type
point
(? means dubious value)
ksedst()+31
call
ksedst1()
000000000 ? 000000001 ?
7FFF19B98CA0 ? 7FFF19B98D00 ?
7FFF19B98C40 ? 000000000 ?
ksedmp()+610
call
ksedst()
000000000 ? 000000001 ?
7FFF19B98CA0 ? 7FFF19B98D00 ?
7FFF19B98C40 ? 000000000 ?
ksfdmp()+21
call
ksedmp()
000000003 ? 000000001 ?
7FFF19B98CA0 ? 7FFF19B98D00 ?
7FFF19B98C40 ? 000000000 ?
kgerinv()+161
call
ksfdmp()
000000003 ? 000000001 ?
7FFF19B98CA0 ? 7FFF19B98D00 ?
7FFF19B98C40 ? 000000000 ?
kgeasnmierr()+163
call
kgerinv()
0069107E0 ? 011F80370 ?
7FFF19B98D00 ? 7FFF19B98C40 ?
000000000 ? 000000000 ?
kssmov()+502
call
kgeasnmierr()
0069107E0 ? 011F80370 ?
7FFF19B98D00 ? 7FFF19B98C40 ?
000000029 ? 0D3F1C600 ?
kfncInitSlavePool() call
kssmov()
0D3F1C5D0 ? 000000000 ?
+203
7FFF19B98D00 ? 7FFF19B98C40 ?
000000029 ? 0D3F1C600 ?
kfncWorkMsgAlloc()+ call
kfncInitSlavePool() 0D3F1C5D0 ? 000000000 ?
83
7FFF19B98D00 ? 7FFF19B98C40 ?
000000029 ? 0D3F1C600 ?
kfncFileUnidentify( call
kfncWorkMsgAlloc() 0D3F1C5D0 ? 7FFF19B99AD0 ?
)+635
7FFF19B98D00 ? 7FFF19B98C40 ?
000000029 ? 0D3F1C600 ?
kffmRequestFree()+1 call
kfncFileUnidentify( 7FFF19B99BC8 ? 7FFF19B99BC0 ?
Br,
RajOne needs to know the meaning of the kernel functions and their working within the oracle database. I guess, oracle support can do the analysis more easily as they have access to the software code as well necessary tools to interpret these internal routines.
Aman.... -
How to read/understand an user Trace Files
Dear All,
I am new to this forum, could any help me how to read/understand User Trace File
Thanks,
Kannan Pasupathi
Edited by: 835519 on Feb 10, 2011 2:40 AMHi,
http://hoopercharles.wordpress.com/2009/12/01/10046-extended-sql-trace-interpretation/
http://hoopercharles.wordpress.com/2010/01/26/10046-extended-sql-trace-interpretation-2/
http://hoopercharles.wordpress.com/2010/09/06/10046-extended-sql-trace-interpretation-3/
HTH
Anand -
Not able to get the actual plan from trace file
Hi all
I have a Db package and want to get actual execution plan of all the statements in that pakcage it does provides the plan for System's statements but does not displays the plan for Sql statements
DB version 9.2.0 using the following sequence of insructions
set timing on
set serveroutput on
alter session set events '10046 trace name context forever ,level 12';
begin
run_service.collect_data(sysdate);
end;
alter session set sql_trace=false;
exit; ---exit from Sql
now look at the output
select distinct obj#,containerobj#,pflags,xpflags,mflags
from
sum$, suminline$ where sumobj#=obj# and inline#=:1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 1 1 0 0
total 3 0.00 0.00 1 1 0 0
Misses in library cache during parse: 0
Optimizer goal: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
0 SORT UNIQUE
0 NESTED LOOPS
0 TABLE ACCESS BY INDEX ROWID SUMINLINE$
0 INDEX RANGE SCAN I_SUMINLINE$_2 (object id 1614116)
0 TABLE ACCESS BY INDEX ROWID SUM$
0 INDEX UNIQUE SCAN I_SUM$_1 (object id 319)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 1 0.00 0.00
SELECT SEQ_NUM, S_DATE, S_TIME, CSTATUS, G_SERVICE,
B_REFERENCE, V_REFERENCE, M_PRIORITY
FROM GL_HIST
ORDER BY S_DATE DESC, S_TIME DESC
call count cpu elapsed disk query current rows
Parse 1 0.01 0.01 0 0 0 0
Execute 2819 0.37 0.32 0 0 0 0
Fetch 2819 2.50 20.47 2786 20164 0 2819
total 5639 2.88 20.81 2786 20164 0 2819
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 15550 (recursive depth: 1)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 2786 0.05 18.19
latch free 4 0.04 0.06
UPDATE G_ORIG SET G_SERVICE = :B1
WHERE
SEQ_NUM = :B5 AND S_DATE = :B4 AND S_TIME = :B3 AND
C_STATUS = :B2 AND NVL(G_SERVICE, '+') <> NVL(:B1, '+')
call count cpu elapsed disk query current rows
Parse 1 0.00 0.03 0 0 0 0
Execute 3731 0.74 0.99 261 18712 119 54
Fetch 0 0.00 0.00 0 0 0 0
total 3732 0.74 1.02 261 18712 119 54
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 15550 (recursive depth: 1)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 261 0.01 0.19
latch free 9 0.01 0.04
COMMITRemove the line alter session set sql_trace=false and just exit/disconnect. The explain plain is contained in the STAT lines in the trace file and are only written when the cursor closes. If you turn off tracing before the cursor closes the STAT lines will not get written.
-
How to create the trace file using run_report_object at runtime
Dear All
using :
Oracel Application Server 10g
Oracle Database 11g
Windows XP/sp3
I'm using run_report_object to call a report inside the form. THis report is running OK from reports builder, however it's too slow when run from Application server.
How Can I create a trace file (at runtime) that contains the time spent in sql and formating the layout of the report ??
Here is My code :
repid := find_report_object('report5');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,'INVOICE.REP');
v_url :='paramform=no';
v_url := v_url||' FROM_NO=' || :PRINT_BLOCK.FROM_NO ;
v_url := v_url ||' TO_NO=' || :PRINT_BLOCK.TO_NO ||' FROM_DATE=' || v_from_date ||' TO_DATE='|| v_to_date ||' NO_DATE=' ;
v_url := v_url ||:PRINT_BLOCK.NO_DATE||' IDENT=' ||:PRINT_BLOCK.IDENT_NO||' REPORT_HEADING='''||V_REPORT_HEADING||'''' ;
v_url := v_url||' COMPANY_NO='||:global.company_no;
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,v_url);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,:GLOBAL.INV_REPORT_SERVER_NAME);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
v_rep := RUN_REPORT_OBJECT(repid);
IF rep_status = 'FINISHED' THEN
V1:='/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1);
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?server='||REPORT_SERVER_NAME,'_blank');
END IF;
Thanks a lotSlow running reports often are not the result of a flawed report, but rather a flawed configuration. For example:
1. If you call your reports (from Forms) via the default or inProcess Reports Server, often because startup time is slow, it will appear that it took too long for the report to be delievered. Using a stand-alone Rep Server is the preferred way to do this.
2. If your Forms application makes numerous calls to RRO (RUN_REPORT_OBJECT), this can tend to result in what might appear as a memory leak (although it is not). The result is delayed processing because of the excessive memory use. This problem has been overcome in Forms/Reports 11 by the use of JVM pooling. However in v10 enabling "6i compatibility" mode is the way to overcome the issue. See Note 266073.1
3. If the report runs fine from the Builder and it is connecting to the same db as when you run it from App Server, the issue is unlikely a db problem. However, if you want to look anyway, enable sqlnet tracing.
4. To enable Reports tracing and investigate other tuning options, refer to the Reports 10 documentation:
http://docs.oracle.com/cd/B14099_11/bi.1012/b14048/pbr_tune.htm
Almost forgot to mentioned this one....
If you are using a v11 db with App Server 10, you will probably want to consider reviewing Note 1099035.1 as it discusses an issue related to performance with such a configuration.
Edited by: Michael Ferrante on Apr 10, 2012 8:49 AM
Maybe you are looking for
-
Error in saving billing document
Hi, When the user is trying to create a billing document in using VF01 and save it getting a pop up message which as "ok" "amend" and "Cancel" button and pop up also has material no. and plant. it does not have any error message when the user clicks
-
Safari will not load! Have uninstalled/reinstalled and still won't work
Hi everyone I thought it would be a great idea to download AcidSearch so I could use Google (UK) in Safari. Unfortunately my Safari will now not load at all! I have deleted the SIMBL folders and also any reference to AcidSearch and still it won't wor
-
Run Data Package from custom Menu00F9/VBA macro
HI guys, I have a problem:when creating VBA macro to run Data Package. I get the pop-up error "400" . This is the VBA code I'm using: Application.Run "MNU_eDATA_RUNPACKAGE(""Opening""; ""/CPMB/Opening_Balances""; ""Company""; ""Financial Processes"")
-
How can I work with my adobe Lightroom Version 5 which was added to my Samsung NX3000. If I want to load an .SRW File it is not possible, only the .JPG File. How and from where can I the Module and how is it to install ?
-
Hi, Can anyone send me the link for SAP SNC Config guide. Thanks, AD