ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle诊断事件

oracle诊断事件

原创 Linux操作系统 作者:lhl1212 时间:2009-09-17 15:23:48 0 删除 编辑
Diagnostics Event Syntax Summary

Type

Trace Syntax

       
 

<event name>

<action>

     
   

<action keyword>

‘name'

<trace name>

<action qualifier>

Immediate dumps

immediate
immediate
immediate
immediate
immediate

trace
trace
trace
trace
trace

name
name
name
name
name

blockdump
redohdrs
controlf
systemstate
file_hdrs

level 432043242
level 10
level 10
level 10
level 10

On error

4031
942
4030
4020
4031

trace
trace
trace
trace
trace

name
name
name
name
name

heapdump
errorstack
errorstack
errorstack
errorstack

level 10
forever
level 10
level 10
off

Change behavior

10512
10235

trace
trace

name
name

context
context

forever level 12
forever, level 1

Trace something

10046
10053

trace
trace

name
name

context
context

forever level 8
forever level 1

 
数据块转储
 
select file_id,block_id,blocks
from dba_extents
where segment_name='test'; 
 
alter system dump datafile block ;
alter system dump datafile block min block max ;
 
oradebuy一般不用于块转储
 
缓冲区转储
 
alter session set events 'immediate trace name buffers level ';
alter session set events '600 trace name buffers level 10';
 
init.ora中
event="600 trace name buffers level 10"
 
oradebug setmypid
oradebug dump buffers ;
 
1级:缓冲区头信息
2级:从每个块中转储高速缓存和事务头
3级:转储每个块的整个转储
4级:转储工作组列表和缓冲区头,以及每个块的高速缓存头
5级:从每个块转储事务头
6级:转储每个块的整个转储
 
文件头转储
 
alter session set events 'immediate trace name file_hdrs level 10';
 
oradebug setmypid
oradebug unlimit
oradebug dump file_hdrs 10
 
控制文件转储
 
alter session set events 'immediate trace name controlf level 10';
 
oradebug setmypid
oradebug unlimit
oradebug dump controlf 10
 
堆转储
 
alter session set events 'immediate trace name heapdump level ;
alter session set events '600 trace name heapdump level ;
 
oradebug setmypid
oradebug unlimit
oradebug dump heapdump
 
库高速缓存转储
 
alter session set events 'immediate trace name library_cache level 10'
 
oradebug setmypid
oradebug unlimit
oradebug dump library_cache
 
进程状态转储
 
alter session set events 'immediate trace name processstate level 10';
alter session set events '600 trace name processstate level 10';
 
oradebug setmypid
oradebug unlimit
oradebug dump processstate 10
 
Shared Server 状态转储
 
alter session set events 'immediate trace name shared_server_state level 10';
alter session set events '600 trace name shared_server_state level 10';
 
oradebug setmypid
oradebug unlimit
oradebug dump shared_server_state
 
系统状态转储
 
alter session set max_dump_file_size=unlimited; //移出转储大小的限制
alter session set events 'immediate trace name systemstate level 10';
 
oradebug setmypid
oradebug unlimit
oradebug dump systemstate
 
重做日志转储
 
alter session set max_dump_file_size=unlimited;
alter system dump logfile 'filename';
 
 

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

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

注册时间:2008-12-08

  • 博文量
    252
  • 访问量
    489197