EVENT_MON_STATE scalar function
The EVENT_MON_STATE function returns the current state of an event monitor.
The schema is SYSIBM.
- string-expression
- An expression that returns a value of CHAR or VARCHAR data type. In a Unicode database, if the value is a graphic string, it is first converted to a character string before the function is executed. The value must be the name of an event monitor that is equal to an event monitor name in the SYSCAT.EVENMONITORS catalog view (SQLSTATE 42704).
The result is an integer with one of the following values:
- 0
- The event monitor is inactive.
- 1
- The event monitor is active.
If the argument can be null, the result can be null; if the argument is null, the result is the null value.
Example
The
following example selects all of the defined event monitors, and indicates
whether each is active or inactive:
SELECT EVMONNAME,
CASE
WHEN EVENT_MON_STATE(EVMONNAME) = 0 THEN 'Inactive'
WHEN EVENT_MON_STATE(EVMONNAME) = 1 THEN 'Active'
END
FROM SYSCAT.EVENTMONITORS