轻松掌握一些清内存对象及转储的常用命令
来源:岁月联盟
时间:2008-01-28
一些清内存对象及转储的实用命令:
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; |