The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.
分类:
2008-12-05 14:45:24
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 '/opt/oracle9/oradata/testora9/redo01.log';
alter system dump datafile 3 block max 2 block min 4;