由研究oracle rac lms程式引發10708 event及oradebug dump buffer

wisdomone1發表於2015-11-12

結論

1,對於報錯的分析,可見猜測能力非常重要,聯想能力極為重要
   這個非常重要,如果理解報錯,直接決定你分析思路,最終要花多久時間解決問題
2,oradebug用法還是理解不深
3,oradebug dump buffer 後面的數字,不是字面的級別,而是緩衝區中資料塊的地址即rdba
4,rdba可以基於測試表dbms_rowid,然後dump block,最後查詢rdba,並把16進位制的RDBA轉化為10進位制即可
5,oradebug dump buffer 10進位制的block_rdba
  還有一個伴隨的報錯,要用一個事件
  alter session set events 'immediate trace name set_tsn_p1 level 6';(也要根據報錯進行反推)


6,10708 event跟蹤RAC BUFFER CACHE,歷經各種測試,仍無果,
   基於LMD,LMS以及使用者程式跟蹤,全無有價值的資訊
   還有其它的引數沒有配置嗎,如果是,到底是什麼引數呢
   或者是我採用ORACEBUG的命令或ALTER SYSTEM SET EVENTS的命令不對,到底怎麼回事呢  


7,引申下,oradebug有些命令,不能僅看其命令的表面意思,一定要擴充套件思維,這個非常重要
   也就是說有時會誤導大家,死活想不通,ORACLE就是這樣


8, oradebug dump events根據後面數字的不同,分為跟蹤當前會話,某個程式,資料庫系統中,這些不對級別配置的事件,並記錄到TRC檔案中
   oradebug dump events後面的數字,有效值為:
   1 當前會話
   2 某個程式(區別於上面,比如你想跟蹤某個程式)
   4 整個資料庫系統


9, 還是哪種老話,一定要好好理解或思考報錯的資訊,我對於oradebug dump events後面的數字理解,就是源於報錯資訊
10,用oradebug dump events 是有資料了,但只有條目,沒有真正的資料
   這裡就需要猜測及聯想能力,說明我這塊對於ORACLE的理解以及應用仍然不足
   這塊能力要提升上去,將是一個極大的提升分析能力的過程   


11,繼續上述第6的分析,嘗試了oradebug,alter session,最後透過alter system set events即可讓10708跟蹤RAC BUFFER CACHE
   整個過程還是比較艱辛的,加油   


   具體指令碼如下:
   SQL> alter system set event='10708 trace name context forever,level 10' scope=spfile;


System altered.


SQL> create pfile='/home/oracle/10gpfile.txt' from spfile;


File created.


SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.


Total System Global Area  599785472 bytes
Fixed Size                  2022632 bytes
Variable Size             335545112 bytes
Database Buffers          260046848 bytes
Redo Buffers                2170880 bytes
Database mounted.
Database opened.


[oracle@jingfa1 udump]$ ll -lrht


-rw-r----- 1 oracle oinstall   65 Nov 12 19:10 jingfa1_ora_19482_hbstest.trc
-rw-r----- 1 oracle oinstall   65 Nov 12 19:12 jingfa1_ora_26927_hbstest.trc
-rw-r----- 1 oracle oinstall 1.5K Nov 12 19:37 jingfa1_ora_31562.trc
-rw-r----- 1 oracle oinstall  969 Nov 12 19:38 jingfa1_ora_1779.trc
-rw-rw---- 1 oracle oinstall  593 Nov 12 19:38 jingfa1_ora_2035.trc
-rw-r----- 1 oracle oinstall  759 Nov 12 19:38 jingfa1_ora_1981.trc
-rw-rw---- 1 oracle oinstall  593 Nov 12 19:38 jingfa1_ora_2234.trc
-rw-rw---- 1 oracle oinstall  593 Nov 12 19:38 jingfa1_ora_2233.trc
-rw-r----- 1 oracle oinstall  37K Nov 12 19:38 jingfa1_ora_2261.trc
-rw-rw---- 1 oracle oinstall 3.2K Nov 12 19:39 jingfa1_ora_2224.trc
[oracle@jingfa1 udump]$ date


kclmap: mapping region: 0x60400000 length: 595591168
*** 2015-11-12 19:39:39.982
*** SERVICE NAME:(SYS$USERS) 2015-11-12 19:39:39.982
*** SESSION ID:(146.1) 2015-11-12 19:39:39.981
kclscrs: req=0 block=1/400760
kclscrs: req=0 typ=immediate mode=S
kclscrs: req=0 block=1/400761
kclscrs: req=0 typ=immediate mode=S
kclscrs: req=0 block=1/400763
kclscrs: req=0 typ=immediate mode=S
中間略
kclscrs: req=0 block=1/4022ea
kclwcrs: req=0 typ=cur wtyp=2hop tm=749
kclscrs: req=0 block=3/c01633
kclwcrs: req=0 typ=stale
kclscrs: req=0 block=3/c016fc
kclwcrs: req=0 typ=cur wtyp=2hop tm=870
[oracle@jingfa1 udump]$ 






測試



SQL> select spid from v$process where addr=(select paddr from v$session where sid=130);


SPID
------------
29546


SQL> oradebug setospid 29546
Oracle pid: 22, Unix process pid: 29546, image: oracle@jingfa1 (TNS V1-V3)
SQL> 


SQL> oradebug event 10708 trace name context forever,level 12;
Statement processed


SQL> create table t_rac_cross_buffer(a int);


Table created.


SQL> insert into t_rac_cross_buffer select * from t_rac_buffer;


10000 rows created.


SQL> commit;


Commit complete.


SQL> oradebug event 10708 trace name context off;
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_29546.trc


檢視TRACE FILE沒發現有任何資訊
Received ORADEBUG command 'event 10708 trace name context forever,level 12' from process Unix process pid: 7178, image: 
*** 2015-11-12 16:02:49.680
Received ORADEBUG command 'event 10708 trace name context off' from process Unix process pid: 7178, image: 
Received ORADEBUG command 'tracefile_name' from process Unix process pid: 7178, image


換個思路
仍然沒有資訊


採用oradebug dump buffer居然報錯
SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump buffer 12
Statement processed.
SQL> oradebug flush
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_30018.trc




WARNING: set_tsn_p1 event has not been called.
Using stale value for tablespace number - 0
Dump of buffer cache at level 10 for tsn=0, rdba=12


SQL> alter session set events 'immediate trace name set_tsn_p1 level 12';


Session altered.


可見oradebug dump buffer跟蹤的數字對應表空間的編號,且這個資料字對應資料塊的地址RDBA
SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump buffer 12
Statement processed.
SQL> oradebug flush 
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_9512.trc


Dump of buffer cache at level 10 for tsn=11, rdba=12




即使這個數字是RDBA,我們換個測試表的RDBA進行測試


SQL> select dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid),dbms_rowid.rowid_row_number(rowid),a from t_rac_cross_buffer where a=661;


DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) DBMS_ROWID.ROWID_ROW_NUMBER(ROWID)          A
------------------------------------ ------------------------------------ ---------------------------------- ----------
                                   5                                22724                                  0        661
                                   5                                22744                                100        661
                                   5                                22760                                200        661
                                   5                                22776                                300        661
                                   5                                22792                                400        661
                                   5                                26904                                500        661
                                   5                                26920                                600        661


7 rows selected.


SQL> alter session set tracefile_identifier='block_strtest';


Session altered.


SQL> alter system dump datafile 5 block 22724;


System altered.


[oracle@jingfa1 udump]$ more jingfa1_ora_29546_block_strtest.trc|grep rdba
buffer tsn: 5 rdba: 0x014058c4 (5/22724)






SQL> select dbms_utility.data_block_address_file(to_number('014058c4','xxxxxxxx')) file_no,dbms_utility.data_block_address_block(to_number('014058c4','xxxxxxxx')) block_no from dual;


   FILE_NO   BLOCK_NO
---------- ----------
         5      22724




SQL> select ts#,name from v$tablespace;


       TS# NAME
---------- ------------------------------
         0 SYSTEM
         1 UNDOTBS1
         2 SYSAUX
         3 TEMP
         4 UNDOTBS2
         5 USERS         


SQL> alter session set events 'immediate trace name set_tsn_p1 level 4';--測試表空間編號減去1,由上述報錯可知


Session altered.


SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump buffer 014058c4 --不能直接DUMP 測試表所對應的16進位制RDBA
ORA-01858: a non-numeric character was found where a numeric was expected
SQL> select to_number('014058c4','xxxxxxxx') from dual;--16進位制RDBA轉化為10進位制


TO_NUMBER('014058C4','XXXXXXXX')
--------------------------------
                        20994244


SQL> oradebug dump buffer 20994244  
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_8888.trc
SQL> 


有報錯
Dump of buffer cache at level 10 for tsn=3, rdba=20994244




SQL> alter session set events 'immediate trace name set_tsn_p1 level 6';


Session altered.


SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump buffer 20994244
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_28767.trc
SQL> 


*** 2015-11-12 17:05:12.795
*** SERVICE NAME:(SYS$USERS) 2015-11-12 17:05:12.794
*** SESSION ID:(141.769) 2015-11-12 17:05:12.794
Dump of buffer cache at level 10 for tsn=5, rdba=20994244
BH (0x6e3d95f8) file#: 5 rdba: 0x014058c4 (5/22724) class: 1 ba: 0x6e2fc000
  set: 3 blksize: 8192 bsi: 0 set-flg: 2 pwbcnt: 290
  dbwrid: 0 obj: 10447 objn: 10447 tsn: 5 afn: 5
  hash: [82b7ae88,82b7ae88] lru: [6e7d1e68,6e7cf718]
  lru-flags: on_auxiliary_list
  ckptq: [NULL] fileq: [NULL] objq: [NULL]
  st: FREE md: NULL tch: 0 le: (nil)
  flags:
 GLOBAL CACHE ELEMENT DUMP (address: 0x627e3a80):
  id1: 0x58c4 id2: 0x50000 obj: 10447 block: (5/22724)
  lock: NC rls: 0x0000 acq: 0x0000 latch: 0
  flags: 0x43 fair: 0 recovery: 0 fpin: 'ktspbwh2: ktspfmdb'
  bscn: 0x0.0 bctx: (nil) write: 0 scan: 0x0 xflg: 0 xid: 0x0.0.0
  lcp: (nil) lnk: [NULL] lch: [0x627ea788,0x627e74c8]
  seq: 15 hist: 197 48 1 66 144:0 192 352 197 48 1 113 424 143:0 325 352
 GCS SHADOW 0x627e3af0,3 sq[0x627e3af0,0x627e3af0] resp[(nil),0x58c4.50000] pkey 10447
   grant 0 cvt 0 mdrole 0x0 st 0x40 GRANTQ rl LOCAL
   master 0 owner 0 sid 0 remote[(nil),0] hist 0x8230118c
   history 0xc.0x6.0x1.0xc.0x2.0x2. cflag 0x0 sender 0 flags 0x0 replay# 0
   disk: 0x0000.00000000 write request: 0x0000.00000000
   pi scn: 0x0000.00000000 
   msgseq 0x0 updseq 0x0 reqids[2,0,0] infop 0x0
   pkey 10447
   hv 49 [stat 0x0, 0->0, wm 32767, RMno 0, reminc 0, dom 0]
   kjga st 0x4, step 0.0.0, cinc 4, rmno 4, flags 0x0
   lb 0, hb 0, myb 280, drmb 280, apifrz 0
   


再回過頭看下10708 EVENT
SQL> select spid,pid,program from v$process where lower(program) like '%lms%';


SPID                PID PROGRAM
------------ ---------- ------------------------------------------------
5183                  7 oracle@jingfa1 (LMS0)


SQL> oradebug setospid 5183
Oracle pid: 7, Unix process pid: 5183, image: oracle@jingfa1 (LMS0)
SQL> oradebug event 10708 trace name context forever,level 12;
Statement processed.


SQL> show user
USER is "TBS_ZXY"
SQL> create table t_boc(a int);


Table created.


SQL> insert into t_boc select level from dual connect by level<=10000;


10000 rows created.


SQL> commit;


Commit complete.


SQL> oradebug event 10708 trace name context off;
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/bdump/jingfa1_lms0_5183.trc


跟蹤了LMS,沒有看到有價值的資訊
*** SERVICE NAME:() 2015-11-12 15:46:29.138
*** SESSION ID:(165.1) 2015-11-12 15:46:29.138
 0 GCS shadows cancelled, 0 closed
 0 GCS resources traversed, 0 cancelled
 0 GCS shadows traversed, 0 replayed, 0 duplicates
 lms 0 finished replaying gcs resources
 0 write requests issued in 0 GCS resources
 0 PIs marked suspect, 0 flush PI msgs
 0 write requests issued in 0 GCS resources
 0 PIs marked suspect, 0 flush PI msgs
 0 write requests issued in 0 GCS resources
 0 PIs marked suspect, 0 flush PI msgs
 0 write requests issued in 0 GCS resources
 0 PIs marked suspect, 0 flush PI msgs
 0 write requests issued in 0 GCS resources
 0 PIs marked suspect, 0 flush PI msgs
 lms 0 finished fixing gcs write protocol
*** 2015-11-12 15:46:40.320
 0 GCS shadows cancelled, 0 closed
 0 GCS resources traversed, 0 cancelled
 0 GCS shadows traversed, 0 replayed, 0 duplicates
 lms 0 finished replaying gcs resources
 0 write requests issued in 0 GCS resources
 0 PIs marked suspect, 0 flush PI msgs
 0 write requests issued in 0 GCS resources
 0 PIs marked suspect, 0 flush PI msgs
 0 write requests issued in 0 GCS resources
 0 PIs marked suspect, 0 flush PI msgs
 0 write requests issued in 0 GCS resources
 0 PIs marked suspect, 0 flush PI msgs
 0 write requests issued in 0 GCS resources
 0 PIs marked suspect, 0 flush PI msgs
 lms 0 finished fixing gcs write protocol
kjbmpsyncack: domain 0, from 1, type = 1
kjbmpsyncack[4,0]: complete


跟蹤下LMD




SQL> oradebug  setospid 5181
Oracle pid: 6, Unix process pid: 5181, image: oracle@jingfa1 (LMD0)
SQL> oradebug event 10708 trace name context forever,level 12;
Statement processed.


SQL> insert into t_boc select level from dual connect by level<=10000;


10000 rows created.


SQL> commit;


Commit complete.




可見如果之前手工刪除LMD的跟蹤TRC檔案,再次生成是空的檔案或生成的檔案不存在
SQL> oradebug event 10708 trace name context off;
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/bdump/jingfa1_lmd0_5181.trc




SQL> oradebug  setospid 5181
Oracle pid: 6, Unix process pid: 5181, image: oracle@jingfa1 (LMD0)
SQL> oradebug event 10708 trace name context forever,level 12;
Statement processed.
SQL> oradebug flush
Statement processed.
SQL> oradebug flush
Statement processed.
SQL> oradebug flush
Statement processed.
SQL> oradebug flush
Statement processed.
SQL> oradebug event 10708 trace name context off;
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/bdump/jingfa1_lmd0_5181.trc
SQL> host ll -l /u01/app/oracle/admin/jingfa/bdump/jingfa1_lmd0_5181.trc
/bin/bash: ll: command not found


SQL> host ls -l /u01/app/oracle/admin/jingfa/bdump/jingfa1_lmd0_5181.trc
-rw-r--r-- 1 oracle oinstall 0 Nov 12 17:52 /u01/app/oracle/admin/jingfa/bdump/jingfa1_lmd0_5181.trc




SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump events 1
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_6610.trc
SQL> host ls -l /u01/app/oracle/admin/jingfa/udump/jingfa1_ora_6610.trc
-rw-r----- 1 oracle oinstall 752 Nov 12 18:21 /u01/app/oracle/admin/jingfa/udump/jingfa1_ora_6610.trc
可見資訊非常少,也不懂為何義
Dump event group for level SESSION
TC Addr  Evt#(b10)   Action   TR Addr    Arm    Life


加大級別
SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump events 12
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_6610.trc
提示級別不對,有效的級別為:會話是1,程式是2,系統是4
Bad group level (12) passed to dump routine
Valid values are (1) Session (2) Process (4) System)


轉儲程式
SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump events 2
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_6610.trc


*** 2015-11-12 18:25:34.673
Dump event group for level PROCESS
TC Addr  Evt#(b10)   Action   TR Addr    Arm    Life


轉儲系統
SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump events 4
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_6610.trc


Dump event group for level SYSTEM
TC Addr  Evt#(b10)   Action   TR Addr    Arm    Life




不過上述全沒有資訊,僅是個條目


SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump events 4
Statement processed.
SQL> oradebug flush
Statement processed.
SQL> oradebug flush
Statement processed.
SQL> oradebug flush
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_6610.trc




為何僅有條目,沒有內容呢?肯定是少執行或配置了什麼命令
我們再好好分析下TRC檔案產生的條目,好像是要和跟蹤的EVENT有關,你看evt#我估計就是event的編號,arm我估計就是對應EVENT的報錯資訊
TC Addr  Evt#(b10)   Action   TR Addr    Arm    Life


我們在當前會話跟蹤一個4031事件
SQL> alter session set events '4031 trace name errorstack forever,level 12';


Session altered.


SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump events 1
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_6610.trc
看到沒,這下有資料了
Dump event group for level SESSION
TC Addr  Evt#(b10)   Action   TR Addr    Arm    Life
2F3DED08 4031       1       2f3d00f8 0 0
        TR Name             TR level   TR address       TR arm     TR life    TR type
        ERRORSTACK                   12 0         -1          2          0






關閉了事件,TRC檔案又只有條目資訊了
SQL> alter session set events '4031 trace name errorstack off';


Session altered.


SQL> oradebug setmypid
Statement processed.
SQL> oradebug dump events 1
Statement processed.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/jingfa/udump/jingfa1_ora_6610.trc   


*** 2015-11-12 18:36:25.257
Dump event group for level SESSION
TC Addr  Evt#(b10)   Action   TR Addr    Arm    Life


好,我們繼續分析10708 event,可見對於oracebug event,即使配置一個不存在的event,oradebug也會配置成功,不會報任何的錯誤
SQL> oradebug setmypid
Statement processed.
SQL> oradebug event 888888888 trace name context forever,level 12;
Statement processed.


可以直接檢視event的含義,採用oerr ora event
SQL> host oerr ora 10708
10708, 00000, "print out trace information from the RAC buffer cache"
// *Cause: N/A
// *Action: THIS IS NOT A USER ERROR NUMBER/MESSAGE.  THIS DOES NOT NEED TO BE
//          TRANSLATED OR DOCUMENTED. IT IS USED ONLY FOR DEBUGGING.


SQL> host oerr ora 888888888


不用oracebug,換成alter session set events,但是內容還是空的
SQL> alter session set tracefile_identifier='hbstest';


Session altered.


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


Session altered.


SQL> alter session set events '10708 trace name context off';


Session altered.


繼續改用alter system set events,仍然沒有內容
SQL> alter session set tracefile_identifier='hbstest';


Session altered.


SQL> alter system set events '10708 trace name context forever,level 12';


System altered.


SQL> create table t_buffer_dml(a int);


Table created.


SQL> insert into t_buffer_dml values(1);


1 row created.


SQL> commit;


Commit complete.


SQL> alter session set events '10708 trace name context off';


Session altered.


再換個思路
SQL> alter system set event='10708 trace name context forever,level 10' scope=spfile;


System altered.


SQL> create pfile='/home/oracle/10gpfile.txt' from spfile;


File created.


SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.


Total System Global Area  599785472 bytes
Fixed Size                  2022632 bytes
Variable Size             335545112 bytes
Database Buffers          260046848 bytes
Redo Buffers                2170880 bytes
Database mounted.
Database opened.


[oracle@jingfa1 udump]$ ll -lrht


-rw-r----- 1 oracle oinstall   65 Nov 12 19:10 jingfa1_ora_19482_hbstest.trc
-rw-r----- 1 oracle oinstall   65 Nov 12 19:12 jingfa1_ora_26927_hbstest.trc
-rw-r----- 1 oracle oinstall 1.5K Nov 12 19:37 jingfa1_ora_31562.trc
-rw-r----- 1 oracle oinstall  969 Nov 12 19:38 jingfa1_ora_1779.trc
-rw-rw---- 1 oracle oinstall  593 Nov 12 19:38 jingfa1_ora_2035.trc
-rw-r----- 1 oracle oinstall  759 Nov 12 19:38 jingfa1_ora_1981.trc
-rw-rw---- 1 oracle oinstall  593 Nov 12 19:38 jingfa1_ora_2234.trc
-rw-rw---- 1 oracle oinstall  593 Nov 12 19:38 jingfa1_ora_2233.trc
-rw-r----- 1 oracle oinstall  37K Nov 12 19:38 jingfa1_ora_2261.trc
-rw-rw---- 1 oracle oinstall 3.2K Nov 12 19:39 jingfa1_ora_2224.trc
[oracle@jingfa1 udump]$ date


kclmap: mapping region: 0x60400000 length: 595591168
*** 2015-11-12 19:39:39.982
*** SERVICE NAME:(SYS$USERS) 2015-11-12 19:39:39.982
*** SESSION ID:(146.1) 2015-11-12 19:39:39.981
kclscrs: req=0 block=1/400760
kclscrs: req=0 typ=immediate mode=S
kclscrs: req=0 block=1/400761
kclscrs: req=0 typ=immediate mode=S
kclscrs: req=0 block=1/400763
kclscrs: req=0 typ=immediate mode=S
中間略
kclscrs: req=0 block=1/4022ea
kclwcrs: req=0 typ=cur wtyp=2hop tm=749
kclscrs: req=0 block=3/c01633
kclwcrs: req=0 typ=stale
kclscrs: req=0 block=3/c016fc
kclwcrs: req=0 typ=cur wtyp=2hop tm=870
[oracle@jingfa1 udump]$ 




---在139會話大量產生DML
SQL> select sid from v$mystat where rownum=1;


       SID
----------
       139


SQL> select paddr from v$session where sid=139;


PADDR
----------------
0000000083A5E580


SQL> select spid from v$process where addr='0000000083A5E580';


SPID
------------
13992


SQL> insert into t_boc select level from dual connect by level<=10000;


10000 rows created.


SQL> insert into t_boc select level from dual connect by level<=10000;


10000 rows created.


SQL> insert into t_boc select level from dual connect by level<=10000;


10000 rows created.


SQL> insert into t_boc select level from dual connect by level<=10000;


10000 rows created.


SQL> commit;


Commit complete.




-rw-r----- 1 oracle oinstall 1.5K Nov 12 19:37 jingfa1_ora_31562.trc
-rw-r----- 1 oracle oinstall  969 Nov 12 19:38 jingfa1_ora_1779.trc
-rw-rw---- 1 oracle oinstall  593 Nov 12 19:38 jingfa1_ora_2035.trc
-rw-r----- 1 oracle oinstall  759 Nov 12 19:38 jingfa1_ora_1981.trc
-rw-rw---- 1 oracle oinstall  593 Nov 12 19:38 jingfa1_ora_2234.trc
-rw-rw---- 1 oracle oinstall  593 Nov 12 19:38 jingfa1_ora_2233.trc
-rw-r----- 1 oracle oinstall  37K Nov 12 19:38 jingfa1_ora_2261.trc
-rw-rw---- 1 oracle oinstall 3.2K Nov 12 19:39 jingfa1_ora_2224.trc
-rw-r----- 1 oracle oinstall  12K Nov 12 19:46 jingfa1_ora_13992.trc


檢視下jingfa1_ora_13992.trc內容,這個其實就是global buffer cache的內容,可見上述的檔案是基於不同的會話進行分別建立的,
另外:alter set events要生效,必須重啟資料庫,哈哈,終於10708event有值了
kcllkop: req=12 new block=5/1406a97
kcllkop: req=13 new block=5/1406a98
kcllkop: req=0 typ=grant wtyp=2hop tm=1378
kcllkop: req=1 typ=grant wtyp=2hop tm=1380
kcllkop: req=2 typ=grant wtyp=2hop tm=1380
kcllkop: req=3 typ=grant wtyp=2hop tm=1378
kcllkop: req=4 typ=grant wtyp=2hop tm=1377
kcllkop: req=5 typ=grant wtyp=2hop tm=1375
kcllkop: req=6 typ=grant wtyp=2hop tm=1374
kcllkop: req=7 typ=grant wtyp=2hop tm=1373
kcllkop: req=8 typ=grant wtyp=2hop tm=1372
kcllkop: req=9 typ=grant wtyp=2hop tm=1371
kcllkop: req=10 typ=grant wtyp=2hop tm=1369
kcllkop: req=11 typ=grant wtyp=2hop tm=1369
kcllkop: req=12 typ=grant wtyp=2hop tm=1368
kcllkop: req=13 typ=grant wtyp=2hop tm=1365






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

相關文章