1).Block
Oracle 7之前
ALTER SESSION SET EVENTS ‘immediate trace name blockdump level n';
n为block的rdba
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';
n为object_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 + 数据库信息 + 检查点信息
3 level 2 + 可重用节信息
10 level 3
7).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
8).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;
9).Loghist
ALTER SESSION SET EVENTS ‘immediate trace name loghist level n';
1 dump控制文件中最早和最迟的日志历史项
1 dump 2^n个日志历史项