本文主要介绍了一些清内存对象及转储的实用命令,具体内容请参看下文:
Oracle 9i清buffer cache
alter session set events ’immediate trace name flush_cache level 1’;
alter session set events = ’immediate trace name flush_cache’;
Oracle 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 ’/opt/oracle9/oradata/testora9/redo01.log’;
alter system dump datafile 3 block max 2 block min 4;
转自 http://hi.baidu.com/mignoncat/blog/item/4f65c9365bece0dea3cc2bd0.html
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/187805/viewspace-600256/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/187805/viewspace-600256/