日期:2014-05-16  浏览次数:20446 次

Oracle常用诊断事件

oracle常用诊断事件

事件 说明 例子

Event 10013 – Monitor Transaction Recovery

 

在Startup时跟踪事务恢复 ALTER SESSION SET EVENTS ’10013 trace name context forever, level 1′;

Event 10015 – Dump Undo Segment Headers-

 

在事务恢复后做Dump回退段头信息 ALTER SESSION SET EVENTS ’10015 trace name context forever, level 1′;

Event 10032 – Dump Sort Statistics

 

Dump排序的统计信息 ALTER SESSION SET EVENTS ’10032 trace name context forever, level 10′;

Event 10033 – Dump Sort Intermediate Run Statistics

 

排序过程中,内存排序区和临时表空间的交互情况 ALTER SESSION SET EVENTS ’10033 trace name context forever, level 10′;

Event 10045 – Trace Free List Management Operations

 

FREELIST的管理操作 ALTER SESSION SET EVENTS ’10045 trace name context forever, level 1′;
Event 10046 – Enable SQL Statement Trace 跟踪SQL,有执行计划,邦定变量和等待的统计信息,level 12最详细。 ALTER SESSION SET EVENTS ’10046 trace name context forever, level 12′;

LEVEL定义如下:

1:SQL 语句,执行计划和执行状态

4:1的内容加上绑定变量信息

8:1的信息加上等待事件信息

12:1+4+8

Event 10053 – Dump Optimizer Decisions 在分析SQL语句时,Dump出优化器所做的选择,级别level 1最详细 ALTER SESSION SET EVENTS ’10053 trace name context forever, level 1′;

LEVEL定义如下:

1:状态和估算信息

2:只显示估算信息

Event 10060 – Dump Predicates DUMP SQL语句中的断语信息。需要在需要DUMP的用户下创建以下表

CREATE TABLE kkoipt_table
(c1 INTEGER,

c2 VARCHAR2(80));

断语信息会写入该表

ALTER SESSION SET EVENTS ’10060 trace name context forever, level 1′;
Event 10065 – Restrict Library Cache Dump Output for State Object Dumps 限制对象状态DUMP的时候LIBRARY CACHE信息的详细程度
1 Address of library object only

2 As level 1 plus library object lock details

3 As level 2 plus library object handle and library object

缺省是LEVEL 3

ALTER SESSION SET EVENTS ’10065 trace name context forever, level level’;

Event 10079 – Dump SQL*Net Statistics-

 

Dump SQL*NeT的统计信息 ALTER SESSION SET EVENTS ’10079 trace name context forever, level 2′;

Event 10081 – Trace High Water Mark Changes

 

HWM的改变 ALTER SESSION SET EVENTS ’10081 trace name context forever, level 1′;

Event 10104 – Dump Hash Join Statistics

 

HASH JOIN的统计信息 ALTER SESSION SET EVENTS ’10104 trace name context forever, level