Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I see the following commands:

  • drop event monitor
  • set event monitor
  • create event monitor

But nothing like list event monitor or get event monitor. Is there a DB2 command to list all current event monitors?

I'm currently using DB2 9.7 but am interested in answers for other versions as well.

share|improve this question
add comment

1 Answer

You can query the system catalog table SYSCAT.EVENTMONITORS to get a list of the event monitors defined in your database:

select evmonname, event_mon_state(evmonname) as enabled
  from syscat.eventmonitors

The second column will return 1 for active event monitors, and 0 for inactive event monitors.

This query will work for all versions of DB2 on Linux, UNIX or Windows.

share|improve this answer
    
Are there any commands that don't include "select"? –  Jason Axelson May 8 '13 at 3:43
    
No. All event monitors are stored in the system catalog. –  Ian Bjorhovde May 8 '13 at 4:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.