Oracle Internal Event:10200 Consistent Read诊断事件
生活随笔
收集整理的這篇文章主要介紹了
Oracle Internal Event:10200 Consistent Read诊断事件
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
10200(consistent read buffer status)內(nèi)部診斷事件可以用于探測(cè)一致性讀CR(consistent read)塊的訪(fǎng)問(wèn)情況,雖然cr讀的統(tǒng)計(jì)信息可以從v$sysstat或AWR/statspack中獲取,但是10200 event還是我們研究Consistent Read一致性讀的有力工具。該事件可以通過(guò)在會(huì)話(huà)session級(jí)別設(shè)置ALTER SESSION SET EVENTS 或 DBMS_SYSTEM.SET_EV. Set 來(lái)開(kāi)啟,一般調(diào)用級(jí)別為L(zhǎng)evel 10。 該事件返回的trace跟蹤文件,記錄了為了實(shí)現(xiàn)一致性讀的目的,哪些數(shù)據(jù)塊以及這些塊的各歷史版本在執(zhí)行過(guò)程中被創(chuàng)建(CR block creation)并檢驗(yàn)(CR block inspection),以找出Best CR block滿(mǎn)足Consistent一致性。 注意10200 Internal Event主要是被ktrgtc和ktrget(call ktrget to get one block ->calling KTR layer to apply RBS to have consistent read Block;)這2個(gè)Oracle內(nèi)核功能函數(shù)觸發(fā),這2個(gè)內(nèi)部函數(shù)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中得到了加強(qiáng),通過(guò)該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轉(zhuǎn)載于:https://www.cnblogs.com/macleanoracle/archive/2013/03/19/2968024.html
總結(jié)
以上是生活随笔為你收集整理的Oracle Internal Event:10200 Consistent Read诊断事件的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: DNF推荐点怎么弄给的多
- 下一篇: 王者荣耀裁决任务要做多少次