Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Event Monitoring 1

Status
Not open for further replies.

gregsimpson

Programmer
Apr 18, 2002
521
I'm trying to create an event monitor using the Control Centre V8.2. I've selected all the options as regards event type and given the monitor a name. However I need for it to write to table in a particular tablespace (which is not the default tablespace) and so far the syntax has beaten me. Clicking on "Output Options" I am presented with the following

I have tried to overwrite these options but can't get it to work. Anyone got a working example or able to advise me on the syntax?

Cheers
Greg
 
Forgot the options, which are

<evmGroup>
( [(TABLE <tableName>,]
[IN <tablespaceName>,]
[PCTDEACTIVATE <integer>,]
[TRUNC]
[INCLUDES|EXCLUDES (elem1, elem2, ..)]
), ....

Cheers
Greg
 
You can use the following command :
db2evtbl -schema <schema_name> -evm <mon_name> <event_type>
Here is a an example for a TABLES event monitor:
From db2 clp do a :
db2evtbl -schema db22admin -evm testmon TABLES
this will generate some ddl:
CREATE EVENT MONITOR testmon
FOR TABLES
WRITE TO TABLE
TABLE (TABLE db2admin.TABLE_testmon,
INCLUDES (DATA_OBJECT_PAGES,
EVENT_TIME,
EVMON_ACTIVATES,
EVMON_FLUSHES,
INDEX_OBJECT_PAGES,
LOB_OBJECT_PAGES,
LONG_OBJECT_PAGES,
OVERFLOW_ACCESSES,
PAGE_REORGS,
PARTIAL_RECORD,
ROWS_READ,
ROWS_WRITTEN,
TABLE_NAME,
TABLE_SCHEMA,
TABLE_TYPE,
TABLESPACE_ID )),
CONTROL (TABLE db2admin.CONTROL_testmon,
INCLUDES(EVENT_MONITOR_NAME,
MESSAGE,
MESSAGE_TIME ));

copy it into an editor and make changes to it, to add tablespace name. I am just showing the changed lines below. Added tablepace MY_TBLSPACE using IN.

WRITE TO TABLE
TABLE (TABLE db2admin.TABLE_testmon, IN MY_TBLSPACE,

CONTROL (TABLE db2admin.CONTROL_testmon, IN MY_TBLSPACE,
 
rbod,

thanks, thats worked a treat. Worthy of a star.

Cheers
Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top