Generates sample CREATE EVENT MONITOR SQL statements that
can be used when defining event monitors that write to SQL tables.
Command syntax
>>-db2evtbl--+-----------------------+--+---------------+------->
'- -schema--schema-name-' '- -partitioned-'
.-,----------.
V |
>-- -evm--event-monitor-name----event type-+-------------------><
Command parameters
- -schema schema-name
- Schema name. If not specified, the table names are unqualified.
- -partitioned
- If specified, elements that are only applicable for a partitioned
database environment are also generated.
- -evm event-monitor-name
- The name of the event monitor.
- event type
- Any of the event types available on the FOR clause of the CREATE EVENT MONITOR
statement. The values possible are:
- ACTIVITIES
- BUFFERPOOLS
- CONNECTIONS
- CHANGE HISTORY
- DATABASE
- DEADLOCKS (also DEADLOCKS WITH DETAILS, DEADLOCKS WITH DETAILS
HISTORY, DEADLOCKS WITH DETAILS HISTORY VALUES)*
- LOCKING
- PACKAGE CACHE
- STATEMENTS
- STATISTICS
- TABLES
- TABLESPACES
- THRESHOLD VIOLATIONS
- TRANSACTIONS*
- UNIT OF WORK
* This event monitor type is deprecated.
Examples
db2evtbl -schema smith -evm test01 database, tables, tablespaces, bufferpools
Usage notes
Output is written to standard
output.
Defining WRITE TO TABLE event monitors is more straightforward
when using the
db2evtbl tool. For example, the
following steps can be followed to define and activate an event monitor.
- Use db2evtbl to generate the CREATE EVENT MONITOR
statement.
- Edit the SQL statement, removing any unwanted columns.
- Use the CLP to process the SQL statement. (When the CREATE EVENT
MONITOR statement is executing, target tables are created.)
- Issue SET EVENT MONITOR STATE to activate the new event monitor.
Since all events other than deadlock event monitors can
be flushed, creating more than one record per event, users who do
not use the FLUSH EVENT MONITOR statement can leave the element evmon_flushes out of any target tables.
When a LOCKING, UNIT OF WORK or PACKAGE
CACHE event monitor is among the event monitors to be created, the
DDL produced by db2evtbl creates regular, not UE
tables.