oracle dump 及 events
Table of Contents
- 1. 简介
- 2. 查看dump文件
- 3. 格式说明
-
4. dump结构
-
4.1. Memory Dumps
- 4.1.1. Global Area
- 4.1.2. Library Cache
- 4.1.3. Row Cache
- 4.1.4. Buffers
- 4.1.5. block Buffer version
- 4.1.6. Heap
- 4.1.7. Sub Heap
- 4.1.8. Process State
- 4.1.9. System State
- 4.1.10. Error State
- 4.1.11. Hang Analysis
- 4.1.12. Work Area
- 4.1.13. Latches
- 4.1.14. Events
- 4.1.15. Locks
- 4.1.16. Shared Process
- 4.1.17. Background Messages
- 4.2. File Dumps
-
4.1. Memory Dumps
- 5. dump error或者更改数据库行为
1 简介
Oracle 为了方便分析问题,针对每个进程,每个错误信息都设置了相对应的追踪事件(events). 这些events, 可以将相关的内存堆栈信息以及执行过程进行追踪并输出到文件,以便在出现问题时进行分析。
事件的设置有两种层次: 实例层次(system) 和 会话层次(session).
实例层次的设置是通过参数文件来实现的(alter system set 最终也是写到参数文件)。 设置方法如下:
-- 参数文件 EVENT="[eventnumber|immediate] trace name eventname [forever,] [level levelnumber] : .......‘ -- 命令行 alter system set events=‘[eventnumber|immediate] trace name eventname [forever,] [level levelnumber] : .....‘
会话层次的设置是通过修改内存来实现的(alter session set 其实是动态修改内存)。 设置格式如下:
alter session set events‘[eventnumber|immediate] trace name eventname [forever] [, level levelnumber] :.......‘
命令行里的格式基本一致。同时指定多个事件时,使用冒号进行分隔。
2 查看dump文件
大概是从11G 为分界线,11G 及之前的版本,用户主动生成的trace 文件是保存在 user_dump_dest 参数指向的路径中的。 而从12C 开始,该文件则是与alert 日志保存在同一路径中。
2.1 CDB或者12C之后
SELECT ‘$ORACLE_BASE/diag/rdbms/‘||d.value||‘/‘||i.instance_name||‘/trace/‘|| p.spid || ‘.trc‘ trace_file_name FROM (SELECT p.spid FROM v$mystat m, v$session s, v$process p WHERE m.statistic# = 1 AND s.sid = m.sid AND p.addr = s.paddr) p, (SELECT instance_name FROM v$instance) i, (SELECT VALUE FROM v$parameter WHERE NAME = ‘db_name‘) d;
2.2 非CDB 或者11G
SELECT d.value || ‘/‘ || lower(rtrim(i.instance_name, chr(0))) || ‘_ora_‘ || p.spid || ‘.trc‘ trace_file_name FROM (SELECT p.spid FROM v$mystat m, v$session s, v$process p WHERE m.statistic# = 1 AND s.sid = m.sid AND p.addr = s.paddr) p, (SELECT instance_name FROM v$instance) i, (SELECT VALUE FROM v$parameter WHERE NAME = ‘user_dump_dest‘) d;
3 格式说明
- eventnumber
- 指触发dump的事件号,事件号可以是Oracle错误号(出现相应错误时跟踪指定的事件)或oralce内部事件号,内部事件号在10000到10999之间,不能与immediate关键字同用。
- immediate
- 关键字表示命令发出后,立即将指定的结构dump到跟踪文件中,这个关键字只用在alter session语句中,并且不能与 eventnumber、forever关键字同用。
- trace name
- 是关键字
- eventname
- 指事件名称,即要进行dump的实际结构名,参见eventname。若eventname为context,则指根据内部事件号进行跟踪。
- forever
- 关键字表示事件在实例或会话的周期内保持有效状态,不能与immediate同用。
- level
- 为事件级别关键字。但在dump错误栈(errorstack)时不存在级别。
- levelnumber
- 表示事件级别号,一般从1到10,1表示只dump结构头部信息,10表示dump结构的所有信息。
4 dump结构
eventname 根据Oracle数据库结构,分为几个大类,比如内存,文件。
4.1 Memory Dumps
4.1.1 Global Area
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name global_area level n‘;
-
- 1 包含PGA
- 2 包含SGA
- 4 包含UGA
- 8 包含indrect memory
4.1.2 Library Cache
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name library_cache level n‘;
- 1 library cache统计信息 2 包含hash table histogram 3 包含object handle 4 包含object结构(Heap 0)
4.1.3 Row Cache
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name row_cache level n‘;
- 1 row cache统计信息 2 包含hash table histogram 8 包含object结构
4.1.4 Buffers
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name buffers level n‘;
-
- 1 buffer header
- 2 level 1 + block header
- 3 level 2 + block contents
- 4 level 1 + hash chain
- 5 level 2 + hash chain
- 6 level 3 + hash chain
- 8 level 4 + users/waiters
- 9 level 5 + users/waiters
- 10 level 6 + users/waiters
4.1.5 block Buffer version
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name buffer level n‘;
- n为某个指定block的rdba,该命令可以转储某个block在buffer中的所有版本。
4.1.6 Heap
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name heapdump level n‘;
-
- 1 PGA摘要
- 2 SGA摘要
- 4 UGA摘要
- 8 Current call(CGA)摘要
- 16 User call(CGA)摘要
- 32 Large call(LGA)摘要
- 1025 PGA内容
- 2050 SGA内容
- 4100 UGA内容
- 8200 Current call内容
- 16400 User call内容
- 32800 Large call内容
4.1.7 Sub Heap
-
9.0.1版本之前
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name heapdump_addr level n‘;
- level ::若n为subheap的地址,转储的是subheap的摘要信息;若n为subheap的地址+1,转储的则是subheap的内容
-
-
9.2.0版本之后
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name heapdump_addr level n, addr m‘;
- level ::其中m为subheap的地址,n为1转储subheap的摘要,n为2转储subheap的内容
-
4.1.8 Process State
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name processstate level n‘;
- 一般设置为10.
4.1.9 System State
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name systemstate level n‘;
-
- 2: dump (不包括lock element)
- 10: dump
- 11: dump + global cache of RAC
- 256: short stack (函数堆栈)
- 258: 256+2 –>short stack +dump(不包括lock element)
- 266: 256+10 –>short stack+ dump
- 267: 256+11 –>short stack+ dump + global cache of RAC
level 11和 267会 dump global cache, 会生成较大的trace 文件,一般情况下不推荐。一般情况下,如果进程不是太多,推荐用266,因为这样可以dump出来进程的函数堆栈,可以用来分析进程在执行什么操作。但是生成short stack比较耗时,如果进程非常多,比如2000个进程,那么可能耗时30分钟以上。这种情况下,可以生成level 10 或者 level 258, level 258 比 level 10会多收集short short stack, 但比level 10少收集一些lock element data.
另外对于RAC系统,请关注Bug 11800959 - A SYSTEMSTATE dump with level >= 10 in RAC dumps huge BUSY GLOBAL CACHE ELEMENTS - can hang/crash instances (Doc ID 11800959.8)。这个Bug在11.2.0.3上被修复,对于<=11.2.0.2的RAC,当系统中的lock element 很多的时候,如果执行level 10、266或者 267的systemstate dump时,可能会导致数据库hang或者crash,这种情况下可以采用level 258。
4.1.10 Error State
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name errorstack level n‘;
-
- 0 Error stack
- 1 level 0 + function call stack
- 2 level 1 + process state
- 3 level 2 + context area
4.1.11 Hang Analysis
ALTER SESSION SET EVENTS ‘immediate trace name hanganalyze level n‘;
- level
-
- 1-2 只有hanganalyze输出,不dump任何进程
- 3 Level2+Dump出在IN_HANG状态的进程
- 4 Level3+Dump出在等待链里面的blockers(状态为LEAF/LEAF_NW/IGN_DMP)
- 5 Level4+Dump出所有在等待链中的进程(状态为NLEAF)
- 10 dump 所有进程(IGN 状态)
4.1.12 Work Area
-
语句
alter SESSION SET EVENTS ‘immediate trace name workareatab_dump level n‘;
-
- 1 SGA信息
- 2 Workarea Table摘要信息
- 3 Workarea Table详细信息
4.1.13 Latches
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name latches level n‘;
-
- 1 latch信息
- 2 统计信息
4.1.14 Events
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name events level n‘;
-
- 1 session
- 2 process
- 3 system
4.1.15 Locks
ALTER SESSION SET EVENTS ‘immediate trace name locks level n‘;
4.1.16 Shared Process
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name shared_server_state level n‘;
- n取值为1~14
4.1.17 Background Messages
-
语句
ALTER SESSION SET EVENTS ‘immediate trace name bg_messages level n‘;
- n为pid+1
4.2 File Dumps
4.2.1 Block
-
Oracle 7之前
ALTER SESSION SET EVENTS ‘immediate trace name blockdump level n‘;
n为block的rdba
-
Oracle8以后
当用alter system dump datafile n的时候,如果内存中有,就从内存中读。 如果内存中没有,就采用Direct方式读取,不经过Buffer cache(下次执行的时候还是从硬盘中读). 也就是说,alter system dump datafile命令不会对Buffer cache产生任何影响。
-- 单个数据块 ALTER SYSTEM DUMP DATAFILE file# BLOCK block#; -- 多个数据块 ALTER SYSTEM DUMP DATAFILE file# BLOCK MIN minimum_block# BLOCK MAX maximum_block#;
4.2.2 Tree Dump
ALTER SESSION SET EVENTS ‘immediate trace name treedump level n‘;
n 为 object_id.
4.2.3 Undo Segment Header
ALTER SYSTEM DUMP UNDO_HEADER ‘segment_name‘;
4).Undo for a Transaction
ALTER SYSTEM DUMP UNDO BLOCK ‘segment_name‘ XID xidusn xidslot xidsqn;
4.2.4 File Header
ALTER SESSION SET EVENTS ‘immediate trace name file_hdrs level n‘;
1 控制文件中的文件头信息 2 level 1 + 文件头信息 3 level 2 + 数据文件头信息 10 level 3
4.2.5 Control file
ALTER SESSION SET EVENTS ‘immediate trace name controlf level n‘;
1 文件头信息 2 level 1 + 信息 + 检查点信息 3 level 2 + 可重用节信息 10 level 3
4.2.6 Redo log Header
ALTER SESSION SET EVENTS ‘immediate trace name redohdr level n‘;
1 控制文件中的redo log信息 2 level 1 + 文件头信息 3 level 2 + 日志文件头信息 10 level 3
4.2.7 Redo log
ALTER SYSTEM DUMP LOGFILE ‘FileName‘;
ALTER SYSTEM DUMP LOGFILE ‘FileName‘ SCN MIN MinimumSCN SCN MAX MaximumSCN TIME MIN MinimumTime TIME MAX MaximumTime LAYER Layer OPCODE Opcode DBA MIN FileNumber . BlockNumber DBA MAX FileNumber . BlockNumber RBA MIN LogFileSequenceNumber . BlockNumber RBA MAX LogFileSequenceNumber . BlockNumber;
其中time = (((((yyyy - 1988)) * 12 + mm - 1) * 31 + dd - 1) * 24 + hh) * 60 + mi)* 60 + ss;
4.2.8 Loghist
ALTER SESSION SET EVENTS ‘immediate trace name loghist level n‘;
1dump控制文件中最早和最迟的日志历史项 >1 dump 2^n个日志历史项
5 dump error或者更改数据库行为
dump error 开启语句:
ALTER SYSTEM SET EVENTS ‘eventnumbertrace name context forever, level <level>‘;
关闭语句:
ALTER SYSTEM SET EVENTS ‘event trace name context off‘;
或者使用oradebug 开启与关闭。
要注意的是,Events在每一个版本之间都有所改变.有一些存在的事件可能存在争议性或者已经不可用了,往往这些事件号会由新的事件所替代掉.也要注意在当前的版本中message file不一定可以反映出Events.
很多Events都会影响数据库的行为,一些测试Events极有可能导致数据库DOWN掉.所以,在没有Oracle Support的前提下,最好不要在PRO系统上做Events操作.DEV系统上如果要做Events最好先做个数据库的全备份.
在UNIX系统下message文件在底下目录$ORACLE_HOME/rdbms/mesg/oraus.msg
在NT系统下message文件在底下目录$ORACLE_HOME/rdbms/mesg/oraus.msg
5.1 列出所有可用events
SET SERVEROUTPUT ON SIZE UNL SET LINE 9999 DECLARE ERR_MSG VARCHAR2(32767); BEGIN DBMS_OUTPUT.ENABLE(‘‘); FOR ERR_NUM IN 00000 .. 10999 LOOP ERR_MSG := SQLERRM(-ERR_NUM); IF ERR_MSG NOT LIKE ‘%Message ‘ || ERR_NUM || ‘ not found%‘ THEN DBMS_OUTPUT.PUT_LINE(ERR_MSG); END IF; END LOOP; END; /
在UNIX系统下message文件在底下目录$ORACLE_HOME/rdbms/mesg/oraus.msg
在NT系统下message文件在底下目录$ORACLE_HOME/rdbms/mesg/oraus.msg
oraus.msg文件属于文本文件,可以直接打开查看。
5.2 列出会话或者系统中已开启的events
如果是在系统级别设置了events , 可以通过 show parameter events 来查看。 更方便的是通过 oradebug eventdump [system | session] 来查看。非常方便,而且全面。比如10046 和 10053 两个trace ,通过 函数dbms_system.read_ev 是无法取出的,但是oradebug eventdump可以。
这是使用dbms_system.read_ev 读取会话中开启的events:
SET SERVEROUTPUT ON SIZE UNL DECLARE EVENT_LEVEL NUMBER; BEGIN FOR I IN 10000 .. 99999 LOOP SYS.DBMS_SYSTEM.READ_EV(I, EVENT_LEVEL); IF (EVENT_LEVEL > 0) THEN DBMS_OUTPUT.PUT_LINE(‘Event ‘ || TO_CHAR(I) || ‘ set at level ‘ || TO_CHAR(EVENT_LEVEL)); END IF; END LOOP; END; /
下面是示例:
-- 查看会话初始事件状态 SQL> oradebug setmypid Statement processed. SQL> oradebug eventdump system 12641 errorstack (3) systemstate (10) SQL> oradebug eventdump session 12641 errorstack (3) systemstate (10) SQL> SET SERVEROUTPUT ON SIZE UNL DECLARE l_level NUMBER; SQL> 2 3 BEGIN 4 FOR l_event IN 0..10999 5 LOOP 6 dbms_system.read_ev (l_event,l_level); 7 IF l_level > 0 THEN 8 dbms_output.put_line (‘Event ‘||TO_CHAR (l_event)||‘ is set at level ‘||TO_CHAR (l_level)); 9 END IF; 10 END LOOP; 11 END; 12 / PL/SQL procedure successfully completed. -- 在当前会话设置 一些事件 SQL> ALTER SESSION SET EVENTS ‘10046 trace name context forever,level 12‘; Session altered. SQL> ALTER SESSION SET EVENTS ‘10053 trace name context forever, level 1‘; Session altered. SQL> ALTER SESSION SET EVENTS ‘10710 trace name context forever, level 1‘; Session altered. -- 查看当前会话追踪事件状态 SQL> SET SERVEROUTPUT ON SIZE UNL SQL> DECLARE 2 l_level NUMBER; 3 BEGIN 4 FOR l_event IN 0..10999 5 LOOP 6 dbms_system.read_ev (l_event,l_level); 7 IF l_level > 0 THEN 8 dbms_output.put_line (‘Event ‘||TO_CHAR (l_event)||‘ is set at level ‘||TO_CHAR (l_level)); 9 END IF; 10 END LOOP; 11 END; 12 / Event 10710 is set at level 1 PL/SQL procedure successfully completed. SQL> oradebug eventdump session 10710 trace name context forever, level 1 trace [RDBMS.SQL_OPTIMIZER] trace [RDBMS.SQL_Transform] trace [RDBMS.SQL_MVRW] trace [RDBMS.SQL_VMerge] trace [RDBMS.SQL_Virtual] trace [RDBMS.SQL_APA] trace [RDBMS.SQL_Costing] trace [RDBMS.SQL_Parallel_Optimization] trace [RDBMS.SQL_Plan_Management] sql_trace level=12 12641 errorstack (3) systemstate (10) SQL>
从上面的示例可以验证,oradebug eventdum 要比 dbms_system.read_ev 要全面。
5.3 常用EVENTS说明
由于版本不同,事件编号所代表的作用可能是不一样的。以下只做参考,但是大部分都是可用的
事件编号 | 说明 | 示例 |
---|---|---|
10013 | 在Startup时跟踪事务恢复 | ALTER SESSION SET EVENTS ‘10013 trace name context forever, level 1‘; |
10015 | 在事务恢复后做Dump回退段头信息 | ALTER SESSION SET EVENTS ‘10015 trace name context forever, level 1‘; |
10030 | 会话期间的注销信息 | |
10032 | Dump排序的统计信息 | ALTER SESSION SET EVENTS ‘10032 trace name context forever, level 10‘; |
10033 | 排序过程中,内存排序区和临时表空间的交互情况 | ALTER SESSION SET EVENTS ‘10033 trace name context forever, level 10‘; |
10045 | FREELIST的管理操作 | ALTER SESSION SET EVENTS ‘10045 trace name context forever, level 1‘; |
10046 | 跟踪SQL,有执行计划,邦定变量和等待的统计信息 | ALTER SESSION SET EVENTS ‘10046 trace name context forever, level 12‘; |
,level 12最详细。 | ||
LEVEL定义如下: | ||
1:SQL 语句,执行计划和执行状态 | ||
4:1的内容加上绑定变量信息 | ||
8:1的信息加上等待事件信息 | ||
12:1+4+8 | ||
10053 | 在分析SQL语句时,Dump出优化器所做的选择, | ALTER SESSION SET EVENTS ‘10053 trace name context forever, level 1‘; |
级别level 1最详细 | ||
LEVEL定义如下: | ||
1:状态和估算信息 | ||
2:只显示估算信息 | ||
10059 | 模拟redo日志中的创建和清除错误 | |
10060 | DUMP SQL语句中的谓语信息(where条件)。需要 | ALTER SESSION SET EVENTS ‘10060 trace name context forever, level 1‘; |
在需要DUMP的用户下创建以下表: | ||
CREATE TABLE kkoipt_table | ||
(c1 INTEGER,c2 VARCHAR2(80)); | ||
10061 | 阻止SMON进程在启动时清除临时段 | |
10065 | dump内存中对象时,控制输出内容: | alter session set events ‘10065 trace name context forever,level 3‘; |
1. library object address only | ||
2. level 1 + library object lock details | ||
3. level 2 + library object handle | ||
默认是 3 | ||
10079 | SQL * Net 的统计信息 | ALTER SESSION SET EVENTS ‘10079 trace name context forever, level 2‘; |
10081 | HWM的改变 | ALTER SESSION SET EVENTS ‘10081 trace name context forever, level 1‘; |
10104 | HASH JOIN的统计信息 | ALTER SESSION SET EVENTS ‘10081 trace name context forever, level 1‘; |
10128 | 分区表调整信息 | ALTER SESSION SET EVENTS ‘10128 trace name context forever, level 1‘; |
0X0001 dump pruning descriptor for each | ||
partitioned object | ||
0X0002 dump partition iterators | ||
0x0004 dump optimizer decisions about | ||
partition-wise joins | ||
0x0008 dump rowid range scan pruning | ||
information | ||
9.0.1 及之后的版本,如果指定2及以上level,需要 | ||
创建以下表: | ||
CREATE TABLE kkpap_pruning( | ||
partition_count NUMBER, | ||
iterator VARCHAR2(32), | ||
partition_level VARCHAR2(32), | ||
order_pt VARCHAR2(12), | ||
call_time VARCHAR2(12), | ||
part# NUMBER, | ||
subp# NUMBER, | ||
abs# NUMBER); | ||
10200 | DUMP一致读的信息 | ALTER SESSION SET EVENTS ‘10200 trace name context forever, level 1‘; |
10201 | DUMP一致性读涉及UNDO信息的内容 | ALTER SESSION SET EVENTS ‘10201 trace name context forever, level 1‘; |
10209 | 允许在控制文件中模拟错误 | |
10211 | 触发索引检查事件 | |
10213 | 模拟在写控制文件后崩溃 | |
10214 | 模拟在控制文件中的写错误 | |
10215 | 模拟在控制文件中的读错误 | |
10220 | Dump出Undo头信息的改变 | ALTER SESSION SET EVENTS ‘10220 trace name context forever, level 1‘; |
10221 | Dump Undo的改变 | ALTER SESSION SET EVENTS ‘10221 trace name context forever, level 7‘; |
10224 | 索引块的分裂和删除信息 | ALTER SESSION SET EVENTS ‘10224 trace name context forever, level 1‘; |
10225 | DUMP字段管理的扩展变化 | ALTER SESSION SET EVENTS ‘10225 trace name context forever, level 1‘; |
10229 | 模拟在数据文件上的I/O错误 | |
10231 | 全表扫描时跳过坏块 | ALTER SYSTEM SET EVENTS ‘10231 trace name context forever,level 10‘; |
10232 | dump将逻辑坏块(可用dbms_repaire或者 | |
DB_BLOCK_CHECKING为true | ||
10235 | 用于内存堆检查 | |
10241 | 远程SQL语句的执行信息 | 只能修改参数,不能用ALTER SYSTEM |
event = "10246 trace name context forever, level 1" | ||
10246 | 跟踪PMON进程 | |
10248 | 跟踪DISPATCHER的工作情况,跟踪级别1-10 | event = "10248 trace name context forever, level 10" |
10249 | 跟踪共享服务器的工作情况(MTS) | event = "10249 trace name context forever, level 10" |
10252 | 模拟写数据文件头部错误 | |
10253 | 模拟写redo日志文件错误 | |
10262 | 允许连接时存在内存泄漏,level 是允许的字节数。 | alter session set events ‘10262 trace name context forever, level 300‘; |
10270 | 跟踪共享CURSORS的情况 | event = "10270 trace name context forever, level 10" |
10285 | 模拟控制文件头部损坏 | |
10286 | 模拟控制文件打开错误 | |
10287 | 模拟归档出错 | |
10357 | 调试直接路径机制 | |
10299 | 跟踪表数据块和索引数据块的PREFETCHING | event = "10299 trace name context forever, level 1" |
10357 | 跟踪direct path 操作 | ALTER SESSION SET EVENTS ‘10357 trace name context forever, level 1‘; |
10390 | 跟踪并行操作中的SLAVE统计信息,有多种级别: | ALTER SESSION SET EVENTS ‘10390 trace name context forever, level 1; |
0x0001 Slave-side execution messages | ||
0x0002 Coordinator-side execution messages | ||
0x0004 Slave context state changes | ||
0x0008 Slave ROWID range bind variables and xty | ||
0x0010 Slave fetched rows as enqueued to TQ | ||
0x0020 Coordinator wait reply handling | ||
0x0040 Coordinator wait message buffering | ||
0x0080 Slave dump timing | ||
0x0100 Coordinator dump timing | ||
0x0200 Slave dump allocation file number | ||
0x0400 Terse format for debug dumps | ||
0x0800 Trace CRI random sampling | ||
0x1000 Trace signals | ||
0x2000 Trace parallel execution granule operations | ||
0x4000 Force compilation by slave 0 | ||
10391 | 跟踪并行操作的粒度分配,有多种级别可以设置: | ALTER SESSION SET EVENTS ‘10391 trace name context forever, level 2‘; |
0x0001 每个被扫描对象的汇总信息 | ||
0x0002 each object except extent map | ||
0x0004 each object including extent map | ||
0x0010 summary of each granule generators | ||
0x0020 granule generators except granule instances | ||
0x0040 granule generators including granule instances | ||
0x0080 system information | ||
0x0100 reference object for the query | ||
0x0200 Gives timing in kxfralo | ||
0x0400 Trace affinity module | ||
0x0800 Trace granule allocation during query execution | ||
0x1000 Trace object flush | ||
0x2000 unknown | ||
10393 | 跟踪并行操作的统计信息(每个SLAVE单独列出状态) | ALTER SESSION SET EVENTS ‘10393 trace name context forever, level 1‘; |
10500 | 跟踪SMON进程 | event = "10500 trace name context forever, level 1" |
10608 | 跟踪BITMAP索引创建的详细过程 | ALTER SESSION SET EVENTS ‘10608 trace name context forever, level 10‘; |
10704 | 跟踪锁的使用情况 | ALTER SESSION SET EVENTS ‘10704 trace name context forever, level 1‘; |
10706 | 跟踪全局enqueue的使用情况,在RAC中可用。 | ALTER SESSION SET EVENTS ‘10706 trace name context forever, level 1‘; |
我们可以通过隐藏参数_ksi_trace来控制输出哪种 | ||
类型的enqueue,比如TM和TX锁,该参数只能pfile | ||
中设置,比如_ksi_trace=‘TMTX‘ | ||
10708 | 跟踪RAC环境下的BUFFER CACHE | ALTER SESSION SET EVENTS ‘10708 trace name context forever, level 10‘; |
10710 | 跟踪位图索引的访问情况 | ALTER SESSION SET EVENTS ‘10710 trace name context forever, level 1‘; |
10711 | 跟踪位图索引合并操作 | ALTER SESSION SET EVENTS ‘10711 trace name context forever, level 1‘; |
10712 | 跟踪位图索引 或操作 情况 | ALTER SESSION SET EVENTS ‘10712 trace name context forever, level 1‘; |
10713 | 跟踪位图索引 与操作 | ALTER SESSION SET EVENTS ‘10713 trace name context forever, level 1‘; |
10714 | 跟踪位图索引 minus操作 | ALTER SESSION SET EVENTS ‘10714 trace name context forever, level 1‘; |
10715 | 跟踪位图索引 转换ROWID操作 | ALTER SESSION SET EVENTS ‘10715 trace name context forever, level 1‘; |
10716 | 跟踪位图索引压缩和解压缩情况 | ALTER SESSION SET EVENTS ‘10716 trace name context forever, level 1‘; |
10717 | bitmap index compaction. | ALTER SESSION SET EVENTS ‘10717 trace name context forever, level 1‘; |
10719 | 跟踪位图索引列的DML操作(引起位图索引改变的DML) | ALTER SESSION SET EVENTS ‘10719 trace name context forever, level 1‘; |
10730 | 跟踪细粒度审计的谓语(predicate) | ALTER SESSION SET EVENTS ‘10730 trace name context forever, level 1‘; |
10731 | 跟踪CURSOR的语句情况 | ALTER SESSION SET EVENTS ‘10731 trace name context forever, level 1‘; |
1. parent query and subquery | ||
2. subquery only | ||
10928 | 跟踪PL/SQL执行情况 | ALTER SESSION SET EVENTS ‘10928 trace name context forever, level 1‘; |
10938 | 跟踪PL/SQL执行统计信息 | ALTER SESSION SET EVENTS ‘10938 trace name context forever, level 1‘; |
Created: 2020-09-29 Tue 00:02