SHORT PACKAGES FOR MMON TRACE ENABLE AND DISABLE ORACLE

Use the below shortcut package to enable MMON trace easily without the need to specify additional parameters

create or replace package MMON_TRACE
is
procedure MMON_T;
end;
/

Package created.


create or replace package body MMON_TRACE
is
procedure CALL_MMON_T
is
BEGIN
dbms_monitor.serv_mod_act_trace_enable
(service_name=>'SYS$BACKGROUND',
module_name=>'MMON_SLAVE',
action_name=>'AWR Auto-Purge Slave Action',
waits => true,
binds => true);
END CALL_MMON_T;
procedure MMON_T
is
BEGIN
CALL_MMON_T;
END MMON_T;
END;
/

BEGIN
MMON_TRACE.MMON_T;
END;
/

Use the below shortcut package to disable MMON trace easily without the need to specify additional parameters

create or replace package MMON_TRACE_CLOSE
is
procedure MMON_T_C;
end;
/

create or replace package body MMON_TRACE_CLOSE
is
procedure CLOSE_MMON_T
is
BEGIN
dbms_monitor.serv_mod_act_trace_disable
(service_name=>'SYS$BACKGROUND',
module_name=>'MMON_SLAVE',
action_name=>'AWR Auto-Purge Slave Action'
);
END CLOSE_MMON_T;
/
procedure MMON_T_C
is
BEGIN
CLOSE_MMON_T;
END MMON_T_C;
END;
/

BEGIN
MMON_TRACE_CLOSE.MMON_T_C;
END;
/

Leave a Reply