DB2 Version 9.7 for Linux, UNIX, and Windows

HEALTH_DB_INFO table function

The HEALTH_DB_INFO table function returns 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_INFO--(--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 an aggregate of 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_INFO table function.

Example

SELECT * FROM TABLE(HEALTH_DB_INFO('',-1)) AS T
The following example is a sample output from this query.
SNAPSHOT_TIMESTAMP         DB_NAME     INPUT_DB_ALIAS      ...
-------------------------- -------...- ---------------...- ...
2006-02-13-12.30.23.340081 SAMPLE      SAMPLE              ...
                                                              
  1 record(s) selected.                                       
Output from this query (continued).
... DB_PATH                      DB_LOCATION SERVER_PLATFORM ... 
... ------------------------...- ----------- --------------- ... 
... D:\DB2\NODE0000\SQL00003\              1               5 ... 
Output from this query (continued).
... ROLLED_UP_ALERT_STATE ROLLED_UP_ALERT_STATE_DETAIL
... --------------------- ----------------------------
...                     4 Alarm                       

Information returned

Table 1. Information returned by the HEALTH_DB_INFO table function
Column name Data type Description or corresponding monitor element
SNAPSHOT_TIMESTAMP TIMESTAMP snapshot_timestamp - Snapshot timestamp
DB_NAME VARCHAR(128) db_name - Database name
INPUT_DB_ALIAS VARCHAR(128) input_db_alias - Input database alias
DB_PATH VARCHAR(1024) db_path - Database path
DB_LOCATION INTEGER db_location - Database location
SERVER_PLATFORM INTEGER server_platform - Server operating system
ROLLED_UP_ALERT_STATE BIGINT The most severe alert state captured by this snapshot.

ROLLED_UP_ALERT_
   STATE_DETAIL

VARCHAR(20) The text description of the ROLLED_UP_ALERT_STATE column.