一些轉儲和清除記憶體物件和物理物件的命令

jss001發表於2009-02-08

9i清buffer cache
alter session set events 'immediate trace name flush_cache level 1';

alter session set events = 'immediate trace name flush_cache';

10g中清buffer cache
alter system flush buffer_cache;

清shared pool

alter system flush shared_pool;

轉儲sga

alter session set events 'immediate trace name heapdump level 2';

轉儲library cache

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

Level =1 ,轉儲Library cache統計資訊
Level =2 ,轉儲hash table概要
Level =4 ,轉儲Library cache物件,只包含基本資訊
Level =8 ,轉儲Library cache物件,包含詳細資訊(包括child references,pin waiters等)
Level =16,增加heap sizes資訊
Level =32,增加heap資訊

轉儲控制檔案、日誌檔案、資料檔案:

alter session set events 'immediate trace name controlf level 10';
alter session set events 'immediate trace name redohdr level 3';

alter system dump logfile '...redo01.log';

alter session set events 'immediate trace name file_hdrs level 10';
ALTER SYSTEM DUMP LOGFILE '/opt/oracle9/oradata/testora9/redo01.log';
alter system dump datafile 3 block max 2 block min 4;

轉儲系統狀態

ALTER SESSION SET EVENTS 'IMMEDIATE TRACE NAME SYSTEMSTATE LEVEL 10';

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18921899/viewspace-1016975/,如需轉載,請註明出處,否則將追究法律責任。

相關文章