Understanding DB2®: Learning Visually with Examples
by Raul F. Chong, Clara Liu, Sylvia F. Qi, Dwaine R. Snow
16.8. Event Monitors
While Snapshot Monitors let you “take a picture” of your system at a given time, Event Monitors allow you to collect information based on an event. A typical example is the case of deadlocks. Since it is very difficult to determine when a deadlock is going to happen, taking a snapshot at the right time is almost impossible. Instead, you can use an Event Monitor, which will automatically collect the deadlock information when it occurs. Event Monitors can also be used to collect static and dynamic SQL statements.
The following example shows a sequence of statements that illustrate how to collect Event Monitor information using commands.
(1) create event monitor mymon1 for database, statements write to file 'e:\temp'(2) set ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access