[转]Oracle常用dump命令介绍

 

.Memory Dumps

1).Global Area

ALTER SESSION SET EVENTS 'immediate trace name global_area level n';

1 包含PGA
2
包含SGA
4
包含UGA
8
包含indrect memory

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

3).Row Cache

ALTER SESSION SET EVENTS 'immediate trace name row_cache level n';

1 row cache统计信息
2
包含hash table histogram
8
包含object结构

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

5).Buffer

ALTER SESSION SET EVENTS 'immediate trace name buffer level n';

n为某个指定blockrdba,该命令可以转储某个blockbuffer中的所有版本。

6).Heap

ALTER SESSION SET EVENTS 'immediate trace name heapdump level level';

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
内容

7).Sub Heap

Oracle 9.0.1版本之前

ALTER SESSION SET EVENTS 'immediate trace name heapdump_addr level n';

nsubheap的地址,转储的是subheap的摘要信息
nsubheap的地址+1,转储的则是subheap的内容

Oracle 9.2.0版本之后

ALTER SESSION SET EVENTS 'immediate trace name heapdump_addr level n, addr m';

其中msubheap的地址

n1转储subheap的摘要,n2转储subheap的内容

8).Process State

ALTER SESSION SET EVENTS 'immediate trace name processstate level n';

9).System State

ALTER SESSION SET EVENTS 'immediate trace name systemstate level n';

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

11).Hang Analysis

ALTER SESSION SET EVENTS 'immediate trace name hanganalyze level n';

12).Work Area

ALTER SESSION SET EVENTS 'immediate trace name workareatab_dump level n';

1 SGA信息
2 Workarea Table
摘要信息
3 Workarea Table
详细信息

13).Latches

ALTER SESSION SET EVENTS 'immediate trace name latches level n';

1 latch信息
2
统计信息

14).Events

ALTER SESSION SET EVENTS 'immediate trace name events level n';

1 session
2 process
3 system

15).Locks

ALTER SESSION SET EVENTS 'immediate trace name locks level n';

16).Shared Server Process

ALTER SESSION SET EVENTS 'immediate trace name shared_server_state level n';

n取值为1~14

17).Background Messages

ALTER SESSION SET EVENTS 'immediate trace name bg_messages level n';

npid+1

.File Dumps

1).Block

Oracle 7之前

ALTER SESSION SET EVENTS 'immediate trace name blockdump level n';

nblockrdba

Oracle8以后

ALTER SYSTEM DUMP DATAFILE file# BLOCK block#;

ALTER SYSTEM DUMP DATAFILE file#
BLOCK MIN minimum_block#
BLOCK MAX maximum_block#;

2).Tree Dump

ALTER SESSION SET EVENTS 'immediate trace name treedump level n';

nobject_id

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;

5).File Header

ALTER SESSION SET EVENTS 'immediate trace name file_hdrs level n';

1 控制文件中的文件头信息
2 level 1 +
文件头信息
3 level 2 +
数据文件头信息
10 level 3

6).Control file

ALTER SESSION SET EVENTS 'immediate trace name controlf level n';

1 文件头信息
2 level 1 +
数据库信息 +

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

转载于:http://blog.itpub.net/12925485/viewspace-450299/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值