Creating event monitors
You create different types of event
monitors by using variations on the CREATE EVENT MONITOR statement.
You can use the options for that statement to specify the type of
data that event monitors collect and how the event monitors produce
their output.
The sections that follow describe the different
output options and how to create event monitors that produce these
types of output.
Before you begin
Procedure
To create an event monitor:
- Determine what kind of event monitor you need.
- Decide what type of output you want from the event monitor. Do you want data to be written to a regular table, an unformatted event table, a file, or a pipe?
- Issue a CREATE EVENT MONITOR statement.
- Optional: If the type of event monitor that
you created requires activation, activate it by issuing the SET EVENT
MONITOR STATE statement. By default, some event monitors activate automatically upon database activation; others require that you activate them manually. However, an event monitor created with the AUTOSTART option will not automatically be activated until the next database activation. Use the SET EVENT MONITOR STATE statement to force a recently-created event monitor into the active state. To determine whether an event monitor starts automatically, refer to the reference information for the relevant CREATE EVENT MONITOR statement.