Deactivating an event monitor
You can use event monitors to capture information related to many different kinds of events that take place on your system.
- A locking event monitor named RTMON_EVMON_LOCKING
- An activity event monitor named RTMON_EVMON_ACTIVITIES
- An utility event monitor named RTMON_EVMON_UTILITY
- A statistics event monitor named RTMON_EVMON_STATS
select evmonname,event_mon_state(evmonname) from syscat.eventmonitors
State "1" specifies the event monitor is active. State '0" specifies the event monitor is inactive.
IBM Db2 Data Management Console regularly copies data from the event monitor tables into its repository and removes the data from the monitored database. The console provides a "watchdog" feature that guarantees the event monitors that it is responsible to deactivate the event monitor if it loses contact with the monitored database. For example, if the console is shutdown for an extended period of time, or if it cannot reach the monitored database due to network problems.
The watchdog makes use of the Administrative Task Scheduler (ATS) to automatically disable the event monitors if the console goes down and requires ATS to be enabled in the monitored database. This feature is off by default.
select NAME,PROCEDURE_SCHEMA,PROCEDURE_NAME from systools.admin_task_list
where
PROCEDURE_NAME for the event monitors is provided below:- "Rtmon Evmon Utility Watchdog" for Utility event monitor
- "Rtmon Evmon Activities Watchdog" for Activity event monitor
- "Rtmon Evmon Locking Watchdog" for Locking event monitor
- "Rtmon Evmon Statistics Watchdog" for statistics event monitor
When the console goes down and if ATS is not enabled, you may need to manually deactivate the event monitors because the event monitors will continue to be active on the monitored database and Db2 will continue to insert monitor data into the tables. In such cases, you may need to deactivate the monitoring profile where the database is assigned to, drop the existing event monitor, and remove the ATS procedure as shown in the following example:
set event monitor RTMON_EVMON_STATS state 0
drop event monitor RTMON_EVMON_STATS
drop procedure IBM_RTMON. RTMON_EVMON_STATISTICS_WATCHDOG
call sysproc.admin_task_remove('Rtmon Evmon Statistics Watchdog',null)