Returns health alert action configuration settings for various object types (database manager, database, table space, and table space container) and for various configuration levels (install default, instance, global, and object).
>>-HEALTH_GET_ALERT_ACTION_CFG--(--objecttype--,----------------> >--cfg_level--,--dbname--,--objectname--)----------------------><
The schema is SYSPROC.
EXECUTE privilege on the HEALTH_GET_ALERT_ACTION_CFG table function.
SELECT OBJECTTYPE, CFG_LEVEL, SUBSTR(DBNAME,1,8) AS DBNAME,
SUBSTR(OBJECTNAME,1,8) AS OBJECTNAME, ID, IS_DEFAULT,
SUBSTR(CONDITION,1,10) AS CONDITION, ACTIONTYPE,
SUBSTR(ACTIONNAME,1,30) AS ACTIONNAME, SUBSTR(USERID,1,8) AS USERID,
SUBSTR(HOSTNAME,1,10) AS HOSTNAME, SCRIPT_TYPE,
SUBSTR(WORKING_DIR,1,10) AS WORKING_DIR, TERMINATION_CHAR,
SUBSTR(PARAMETERS,1,10) AS PARAMETERS
FROM TABLE(HEALTH_GET_ALERT_ACTION_CFG('DB','O','SAMPLE','')) AS ACTION_CFG
WHERE ID = 1004
OBJECTTYPE CFG_LEVEL DBNAME OBJECTNAME ID IS_DEFAULT CONDITION
---------- --------- -------- ---------- --...---- ---------- ----------
DB O SAMPLE 1004 1 ALARM
DB O SAMPLE 1004 1 ALARM
2 record(s) selected.
... ACTIONTYPE ACTIONNAME USERID HOSTNAME
... ---------- ------------------------------ -------- ----------
... S ~/health_center/script/scrpn6 uid1 -
... T 00.0005 uid1 HOST3
... SCRIPT_TYPE WORKING_DIR TERMINATION_CHAR PARAMETERS
... ----------- ----------- ---------------- ----------
... O ~/health_c - -
... - - - -
SELECT CONDITION, ACTIONTYPE, SUBSTR(ACTIONNAME,1,35) AS ACTIONNAME,
SUBSTR(USERID,1,8) AS USERID, SUBSTR(HOSTNAME,1,10) AS HOSTNAME, SCRIPT_TYPE
FROM TABLE(HEALTH_GET_ALERT_ACTION_CFG('DB','O','SAMPLE','')) AS ALERT_ACTION_CFG
WHERE ID=1004
CONDITION ACTIONTYPE ACTIONNAME ...
---------...--- ---------- -------------------------------- ...
ALARM S ~/health_center/script/scrpn6 ...
ALARM T 00.0005 ...
2 record(s) selected.
... USERID HOSTNAME SCRIPT_TYPE
... -------- ---------- -----------
... uid1 - O
... uid1 HOST3 -
The HEALTH_GET_IND_DEFINITION table function can be used to map health indicator IDs to the health indicator names.
Column name | Data type | Description |
---|---|---|
OBJECTTYPE | VARCHAR(3) | Object type. |
CFG_LEVEL | CHAR(1) | Configuration level. |
DBNAME | VARCHAR(128) | Database name. |
OBJECTNAME | VARCHAR(512) | Object name. |
ID | BIGINT | Health indicator ID. |
IS_DEFAULT | SMALLINT | Whether the settings is the default: 1 if it is the default, 0 if it is not the default, Null if it is not applicable. |
CONDITION | VARCHAR(32) | Alert condition upon which the action is triggered. |
ACTIONTYPE | CHAR(1) | Action type: 'S' for script action or 'T' for task action. |
ACTIONNAME | VARCHAR(5000) | If ACTIONTYPE is 'S', this is the script path name. If ACTIONTYPE is 'T', this is the task ID. |
USERID | VARCHAR(1024) | User name under which the action will be executed. |
HOSTNAME | VARCHAR(255) | hostname - Host name monitor element |
SCRIPT_TYPE | CHAR(1) | Script type: If ACTIONTYPE is 'S', 'O' for operating system command script or 'D' for DB2® command script; If ACTIONTYPE is 'T', Null. |
WORKING_DIR | VARCHAR(5000) | The working directory for the script if ACTIONTYPE is 'S' or Null if ACTIONTYPE is 'T'. |
TERMINATION_CHAR | VARCHAR(4) | The statement termination character if it is a DB2 command script action, otherwise Null. |
PARAMETERS | VARCHAR(200) | The command line parameters if it is an operating system command script action. |