DB2 Version 9.7 for Linux, UNIX, and Windows

HEALTH_DB_HIC table function

The HEALTH_DB_HIC function returns collection health indicator information from a health snapshot of a database.

Important: This table function has been deprecated and might be removed in a future release because the health monitor has been deprecated in Version 9.7. For more information, see Health monitor has been deprecated.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-HEALTH_DB_HIC--(--dbname--,--dbpartitionnum--)--------------><

The schema is SYSPROC.

Table function parameters

dbname
An input argument of type VARCHAR(255) that specifies a valid database name in the same instance as the currently connected database when calling this function. Specify a database name that has a directory entry type of either "Indirect" or "Home", as returned by the LIST DATABASE DIRECTORY command. Specify the null value to take the snapshot from all databases under the database instance.
dbpartitionnum
An input argument of type INTEGER that specifies a valid database partition number. Specify -1 for the current database partition, or -2 for all active database partitions. An active database partition is a partition where the database is available for connection and use by applications.

If the null value is specified, -1 is set implicitly.

Authorization

EXECUTE privilege on the HEALTH_DB_HIC table function.

Example

SELECT * FROM TABLE(HEALTH_DB_HIC('',-1)) AS T
The following example is a sample output from this query.
SNAPSHOT_TIMESTAMP         HI_ID     DB_NAME     ...
-------------------------- -----...- -------...- ...
2006-02-13-12.30.33.870959      1015 SAMPLE      ...
2006-02-13-12.30.33.870959      1022 SAMPLE      ...
                                                    
  2 record(s) selected.                             
Output from this query (continued).
... HI_OBJ_NAME                            HI_OBJ_DETAIL     ...
... ---------------------------------...-- -------------...- ...
... "JESSICAE"."EMPLOYEE"                  REORG TABLE       ...
... "SYSIBM"."SYSDATAPARTITIONEXPRESSION"  RUNSTATS          ...
Output from this query (continued).
... HI_OBJ_STATE HI_OBJ_STATE_DETAIL  HI_TIMESTAMP              
... ------------ -------------------- --------------------------
...            2 Attention            2006-02-13-12.24.27.000000
...            2 Attention            2006-02-13-12.29.26.000000

Information returned

Table 1. Information returned by the HEALTH_DB_HIC table function
Column name Data type Description or corresponding monitor element
SNAPSHOT_TIMESTAMP TIMESTAMP snapshot_timestamp - Snapshot timestamp
HI_ID BIGINT A number that uniquely identifies the health indicator in the snapshot data stream.
DB_NAME VARCHAR(128) db_name - Database name
HI_OBJ_NAME VARCHAR(512) A name that uniquely identifies an object in the collection.
HI_OBJ_DETAIL VARCHAR(512) Text that describes why the object was added to the collection.
HI_OBJ_STATE SMALLINT The state of the object. Valid states (defined in sqlmon.h) include:
  • NORMAL (1). Action is not required on this object.
  • ATTENTION (2). Automation is not enabled for this health indicator; action must be taken manually.
  • AUTOMATED (5). Automation is enabled for this health indicator; action will be started automatically.
  • AUTOMATE_FAILED (6). Automation is enabled for this health indicator; action was started, but could not complete successfully. Manual intervention is now required.
HI_OBJ_STATE_DETAIL VARCHAR(20) A translated string version of the value in the HI_OBJ_STATE column.
HI_TIMESTAMP TIMESTAMP The date and time that the alert was generated.