Use the Create Event Monitor window to create an event
monitor that will collect performance information on database activities.
Event monitors can provide information on databases, tables, table
spaces, buffer pools, deadlocks, connections, transactions, and SQL
statements. Event monitors will also automatically collect information
on overflow events.
Before you begin
To create an event monitor, you must have SYSADM or DBADM
authority.
About this task
- Open the Create Event Monitor window by expanding the Control
Center's object tree until you find the Event Monitors folder. Right-click
the Event Monitors folder and select Create from the pop-up menu.
- In the Name field, type a name for the event monitor you
are creating. This new event monitor cannot have the same name as
any existing monitor for this database. Acceptable special characters
in an event monitor name are @, #, and $. Blank spaces are not allowed
in the name.
- Select one or more of the Event Types check boxes to indicate
the type of events that you want to monitor. Note that the Deadlocks event
type is the default selection.
- If you are monitoring deadlocks, you can select With details to
record information about the statements being executed by the applications
in a deadlock and information about any other locks that those applications
hold. Collecting this information will impact your system's
performance because extra data must be passed between processes.
However, this additional information can help you to identify the
sources of deadlocks faster and more efficiently.
- If you are monitoring connections, transactions, or statements,
you can click Filter to activate the Filter group box
in which you can define one or more conditions that will control monitoring
at these levels.
- In the Activate box, indicate when you want this monitor
to start.
If you select Start now, monitoring will start
when the event monitor definition is saved. If you are starting a
statements event monitor, then information about currently executing
statements is not collected. The monitor will start collecting statement
information when the next SQL statement starts. Connections and transactions
event monitors start in similar ways. Note that Start now is
the default selection.
Choosing Restart automatically will
automatically restart the monitor whenever the database starts up.
- Optional: Click Output options to open the Output options
window in which you can customize the way the event monitor will
write its data.
- Optional: Customizing the table in which the event monitor will
write its data is optional. If you do not select this option, then
a table with default settings will be created. The default table
settings are displayed when you open this window. Syntax for table
customization is available.
You can click Reset to return
the value back to the DB2® provided
syntax.
- Indicate the type of file I/O you want. An event monitor can have
either blocked or non-blocked file I/O.
An event monitor has
two I/O buffers. With blocked file I/O, when both buffers are full
database agents wait for the event monitor to write one of its buffers
before attempting to write new data to the buffer. With non-blocked
file I/O, database agents do not wait for the monitor to write its
data, and if both buffers are full when an event occurs, the event
data is discarded.
Blocked I/O provides better data integrity,
but non-blocked I/O provides better performance because database
activities do not slow down due to waits. Blocked file I/O is the
default.
- Specify the size of I/O buffers in the Size of event monitor
buffers field. The default size for each buffer is 4 pages. The
maximum size is limited by the size of the database heap. If you are
running multiple monitors, you can increase the size of the database
heap configuration parameter.