Oracle Internal Event:10200 Consistent Read诊断事件
生活随笔
收集整理的這篇文章主要介紹了
Oracle Internal Event:10200 Consistent Read诊断事件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
10200(consistent read buffer status)內部診斷事件可以用于探測一致性讀CR(consistent read)塊的訪問情況,雖然cr讀的統計信息可以從v$sysstat或AWR/statspack中獲取,但是10200 event還是我們研究Consistent Read一致性讀的有力工具。該事件可以通過在會話session級別設置ALTER SESSION SET EVENTS 或 DBMS_SYSTEM.SET_EV. Set 來開啟,一般調用級別為Level 10。 該事件返回的trace跟蹤文件,記錄了為了實現一致性讀的目的,哪些數據塊以及這些塊的各歷史版本在執行過程中被創建(CR block creation)并檢驗(CR block inspection),以找出Best CR block滿足Consistent一致性。 注意10200 Internal Event主要是被ktrgtc和ktrget(call ktrget to get one block ->calling KTR layer to apply RBS to have consistent read Block;)這2個Oracle內核功能函數觸發,這2個內部函數Internal Function的主要作用: ktrget:
- Initializes a buffer cache CR scan request
- Calls kcbgtcr for the best resident buffer to start from to build the CR buffer
- Calls ktrgcm to build the CR buffer by applying undo
- Returns CR buffer to the requestor
- If successful, returns the “best” candidate (performed by ktrexf or examination function)
- Scans the hash bucket for the DBA for buffers that may be used to build a CR buffer
- If not successful, calls kcbget
#define KCBRSTOP (8|0) /* return this one now */ #define KCBRSAVE (8|1) /* save this one and continue */ #define KCBRSKIP (0|1) /* skip over this one and continue */ #define KCBRQUIT (0|2) /* chuck all, return nothing and stop */ #define KCBRLAST (0|3) /* quit if read from disk else skip */
? 10200診斷事件在11g中得到了加強,通過該event我們可以獲得更多有用的trace信息了: ? SQL> select * from v$version;BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production CORE 11.2.0.3.0 Production TNS for Linux: Version 11.2.0.3.0 - Production NLSRTL Version 11.2.0.3.0 - ProductionSQL> select * from global_name;GLOBAL_NAME -------------------------------------------------------------------------------- MACLEANSQL> alter session set events '10200 trace name context forever, level 10';Session altered.SQL> select * from tv;T1 ----------1SQL> oradebug setmypid; Statement processed.SQL> oradebug tracefile_name; /s01/orabase/diag/rdbms/vprod/VPROD1/trace/VPROD1_ora_28365.trctrace contentktrget2(): started for block objd: 0x000040e1 env [0x2b54cde2a704]: (scn: 0x0000.0026b064 xid: 0x0000.000.00000000 uba: 0x00000000.0000.00 statement num=0 parent xid: 0x0000.000.00000000 st-scn: 0x0000.00000000 hi-scn: 0x0000.00000000 ma-scn: 0x0000.0026b053 flg: 0x00000660) ktrexf(): returning 9 on: 0xbb132d0 cr-scn: 0xffff.ffffffff xid: 0x0000.000.00000000 uba: 0x00000000.0000.00 cl-scn: 0xffff.ffffffff sfl: 0 ktrgcm(): completed for block objd: 0x000040e1 ktrget3(): completed for block objd: 0x000040e1轉載于:https://www.cnblogs.com/macleanoracle/archive/2013/03/19/2968024.html
總結
以上是生活随笔為你收集整理的Oracle Internal Event:10200 Consistent Read诊断事件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DNF推荐点怎么弄给的多
- 下一篇: const_iterator,const