DB2 Version 9.7 for Linux, UNIX, and Windows

Creating an event monitor

The first step in an event monitor's life cycle is its creation. Before you create an event monitor, you must determine where the event records are to be sent: to SQL tables, files, or through named pipes.

About this task

For each event record destination there are particular options that are to be specified in the CREATE EVENT MONITOR SQL statement. The target table of a CREATE EVENT MONITOR statement must be a non-partitioned table. Monitoring events in a partitioned database also requires special attention.

A certain type of event monitor gives you the choice to direct the output to a file, pipe, or (regular) table. This type of monitor is described here. Some of the these details do not apply to event monitors that direct output to an unformatted event table.

Before you begin

You will need SQLADM or DBADM authority to create an event monitor.

Procedure

  1. Create a table event monitor.
  2. Create a file event monitor.
  3. Create a pipe event monitor.
  4. Create an event monitor for a partitioned database.

Results

Once an event monitor is created and activated, it will record monitoring data as its specified events occur.