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 CREATE
EVENT MONITOR statement, for example, DATABASE, TABLES, UNIT OF WORK.
Examples
db2evtbl -schema smith -evm foo 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.