Oracle 11g的Trace檔案存放路徑:oracle\diag\rdbms\**\**\trace
1、DUMP出控制檔案
alter system (session) set events "immediate trace name controlf level 10"
—————————————————————————————
2、DUMP出日誌檔案分析
alter system dump logfile logfilename;
3、DUMP出日誌檔案頭分析
alter session set events "immediate trace name REDOHDR level 10"
———————————————————————————
4、DUMP出LIBRARY CACHE
alter system (session) set events "immediate trace name library_cache level 10"
5、 DUMP出share_pool
alter system (session) set events "immediate trace name heapdump level 10"
6、DUMP出所有資料檔案頭
alter system (session) set events "immediate trace name file_hdrs level 10";
7、DUMP出資料檔案(只能是alter system)
alter system dump datafile n block m
如
select file_id,block_id,blocks from dba_extents where segment_name="EMPLOYEES"
FILE_ID BLOCK_ID BLOCKS
Oracle 11g的Trace檔案存放路徑:oracle\diag\rdbms\**\**\trace
1、DUMP出控制檔案
alter system (session) set events "immediate trace name controlf level 10"
—————————————————————————————
2、DUMP出日誌檔案分析
alter system dump logfile logfilename;
—————————————————————————————
3、DUMP出日誌檔案頭分析
alter session set events "immediate trace name REDOHDR level 10"
———————————————————————————
4、DUMP出LIBRARY CACHE
alter system (session) set events "immediate trace name library_cache level 10"
—————————————————————————————
5、 DUMP出share_pool
alter system (session) set events "immediate trace name heapdump level 10"
———————————————————————————
6、DUMP出所有資料檔案頭
alter system (session) set events "immediate trace name file_hdrs level 10";
———————————————————————————
7、DUMP出資料檔案(只能是alter system)
alter system dump datafile n block m
如
select file_id,block_id,blocks from dba_extents where segment_name="EMPLOYEES"
FILE_ID BLOCK_ID BLOCKS