trace檔案閱讀

zecaro發表於2011-03-13

 

以下是在sqlplus裡進行的操作。

 
> alter session set events '10046 trace name context forever,level 12';

Session altered.

(如果出現ORA-01031: insufficient privileges,則grant alter session to scott;賦予許可權)

scott@DB11GR2>  declare
  2     l_empno number default 7698;
  3   begin
  4     update emp set ename=lower(ename) where empno=l_empno;
  5   end;
  6   /

PL/SQL procedure successfully completed.

scott@DB11GR2> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

trace檔案

Trace file i:\app\diag\rdbms\db11gr2\ins11gr2\trace\ins11gr2_ora_1196.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Windows NT Version V6.1 
CPU                 : 4 - type 8664, 2 Physical Cores
Process Affinity    : 0x0x0000000000000000
Memory (Avail/Total): Ph:1914M/3950M, Ph+PgF:1213M/4204M
Instance name: ins11gr2
Redo thread mounted by this instance: 1
Oracle process number: 22
Windows thread id: 1196, image: ORACLE.EXE (SHAD)

          trace檔案開頭,記錄了一些os和oracle的資訊。

*** 2011-03-13 17:34:37.605
*** SESSION ID:(57.57) 2011-03-13 17:34:37.605
*** CLIENT ID:() 2011-03-13 17:34:37.605
*** SERVICE NAME:(SYS$USERS) 2011-03-13 17:34:37.605
*** MODULE NAME:(SQL*Plus) 2011-03-13 17:34:37.605
*** ACTION NAME:() 2011-03-13 17:34:37.605

 

 

PARSING IN CURSOR #2 len=125 dep=0 uid=32 ct=47 lid=32 tim=21413212268 hv=938959667 ad='7ff3932e0e8' sqlid='c1mnjrhvzfstm'
  declare
     l_empno number default 7369;
     begin
       update emp set ename=lower(ename) where empno=l_empno;
    end;
END OF STMT
PARSE #2:c=62400,e=171857,p=9,cr=23,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=21413212267

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23650854/viewspace-689307/,如需轉載,請註明出處,否則將追究法律責任。

相關文章