ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Oracle常用EVENT参考(一)

Oracle常用EVENT参考(一)

原创 Linux操作系统 作者:xuelu2000 时间:2009-04-04 23:06:06 0 删除 编辑

转载:http://hi.baidu.com/edeed/blog/item/52bc1a4c88fd1cfdd62afc58.html

事件

说明

例子

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:148

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 10';

Event 10128 - Dump Partition Pruning Information

分区表调整信息

ALTER SESSION SET EVENTS '10128 trace name context forever, level level';

Level取值:

1   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或者后面的版本,level 2后还需要建立如下的表:

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

);



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/95233/viewspace-584661/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-03-23

  • 博文量
    89
  • 访问量
    235523