Thursday, December 12, 2013

How to turn on trace for awr snapshot action

 
oradebug setmypid
oradebug unlimit

alter session set "_swrf_test_action" = 10;
begin
dbms_monitor.serv_mod_act_trace_enable(service_name=>'SYS$BACKGROUND',
module_name=>'MMON_SLAVE', action_name=>'Auto-Flush Slave Action');
dbms_monitor.serv_mod_act_trace_enable(service_name=>'SYS$BACKGROUND',
module_name=>'MMON_SLAVE', action_name=>'Remote-Flush Slave Action');
end;
/


begin
dbms_workload_repository.create_snapshot();
end;
/


begin
dbms_monitor.serv_mod_act_trace_disable(service_name=>'SYS$BACKGROUND',
module_name=>'MMON_SLAVE', action_name=>'Auto-Flush Slave Action');
dbms_monitor.serv_mod_act_trace_disable(service_name=>'SYS$BACKGROUND',
module_name=>'MMON_SLAVE', action_name=>'Remote-Flush Slave Action');
end;
/

alter session set "_swrf_test_action" = 11;
oradebug tracefile_name

No comments:

Post a Comment