5).Buffer ALTER SESSION SET EVENTS ‘immediate trace name buffer level n'; n為某個指定block的rdba,該命令可以轉(zhuǎn)儲某個block在buffer中的所有版本。
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內(nèi)容 2050 SGA內(nèi)容 4100 UGA內(nèi)容 8200 Current call內(nèi)容 16400 User call內(nèi)容 32800 Large call內(nèi)容
7).Sub Heap Oracle 9.0.1版本之前 ALTER SESSION SET EVENTS ‘immediate trace name heapdump_addr level n'; 若n為subheap的地址,轉(zhuǎn)儲的是subheap的摘要信息 若n為subheap的地址+1,轉(zhuǎn)儲的則是subheap的內(nèi)容 Oracle 9.2.0版本之后 ALTER SESSION SET EVENTS ‘immediate trace name heapdump_addr level n, addr m'; 其中m為subheap的地址 n為1轉(zhuǎn)儲subheap的摘要,n為2轉(zhuǎn)儲subheap的內(nèi)容
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 統(tǒng)計信息
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'; n為pid+1
二.File Dumps
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 + 數(shù)據(jù)文件頭信息 10 level 3
6).Control file ALTER SESSION SET EVENTS ‘immediate trace name controlf level n'; 1 文件頭信息 2 level 1 + 數(shù)據(jù)庫信息 + 檢查點信息 3 level 2 + 可重用節(jié)信息 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個日志歷史項