Monitoring events

You can use IBM® Data Server Manager (DSM) to automate the monitoring of specific event types that occur on a connected Db2® database.

DSM uses event monitoring to track the following events as they occur on your Db2 database:
  • locking events
  • threshold violations
Note: Event monitoring requires a repository database and is therefore only available in the DSM Enterprise edition.

You can learn more about how Db2 monitors events here.

Event monitoring within DSM

Enabling event monitoring in your DSM monitoring profile automates the following tasks:
  • creating and enabling the event monitors and associated tables in the monitored database
  • setting necessary event monitor parameters (for the locking event monitor only)
  • transferring data from the event monitor tables to the DSM repository database
  • clearing data out of the event monitor tables after capture
  • setting up watchdog stored procedures and Administrative Task Scheduler (ATS) tasks in the monitored Db2 database to disable event monitoring, when needed.

Object changes and security considerations

The event monitoring features require DSM to create some objects and perform writes on them in the monitored database, so you may need to consider the security requirements of your organization before enabling these features. All objects written to the monitored database that can belong in a schema will be put into the schema named IBM_RTMON. (RTMON stands for Real-Time Monitoring.) There are two schema-less items created for each different event monitor:
  • the event monitor itself
  • an ATS schedule entry for shutting down monitoring
Note: The ATS schedule entry will have no effect unless the Db2 ATS feature is enabled
The details of all the objects created are given in the following sections. These objects are all automatically removed when the user disables the corresponding event monitoring features and when DSM shuts down cleanly.

Locking event monitoring objects created by DSM

If locking event monitoring is enabled, DSM will create the following items in the monitored database:
  • A locking event monitor named RTMON_EVMON_LOCKING
  • An unformatted event table IBM_RTMON.LOCK_UE, to which the event monitor writes events (Db2 V9.7)
  • The following formatted event tables to which the data from the LOCK_UE table is extracted during processing (Db2 V9.7)
    • IBM_RTMON.LOCK_EVENT
    • IBM_RTMON.LOCK_PARTICIPANTS
    • IBM_RTMON.LOCK_PARTICIPANT_ACTIVITIES
  • The following event tables to which the data is directly written (Db2 V10.1 and higher):
    • IBM_RTMON.LOCK_EVENT
    • IBM_RTMON.LOCK_PARTICIPANTS
    • IBM_RTMON.LOCK_PARTICIPANT_ACTIVITIES
  • A stored procedure IBM_RTMON.RTMON_EVMON_LOCKING_WATCHDOG
  • A Db2 ATS task named “Rtmon Evmon Locking Watchdog”
Note: DSM will also disable the legacy locking event monitor named DB2DETAILDEADLOCK, if it is present. This prevents locking events from being monitored in two locations, and it avoids needing to periodically clean out the contents of the legacy event monitor to prevent the table space from filling up.

Threshold violation event monitoring objects created by DSM

If threshold event monitoring is enabled, DSM will create the following items in the monitored database:
  • a threshold violations event monitor named RTMON_EVMON_THRESH
  • a formatted event table IBM_RTMON.THRESH_VIOLATIONS, to which the event monitor writes events
  • A stored procedure IBM_RTMON.RTMON_EVMON_THRESH_WATCHDOG
  • A Db2 ATS task named “Rtmon Evmon Thresh Watchdog”