DB2 Scalar functions - EVENT_MON_STATE


Volta a página anterior

Volta ao Menu das scalar functions

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

EVENT_MON_STATE

The EVENT_MON_STATE function returns the current state of an event monitor.

EVENT_MON_STATE ( string-expression)

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


© Copyright IBM Corp.