DB2_CLUSTER_HOST_STATE administrative view and DB2_GET_CLUSTER_HOST_STATE table function - get information about hosts
The DB2_CLUSTER_HOST_STATE administrative view and DB2_GET_CLUSTER_HOST_STATE table function retrieve information about the hosts that are part of a Db2® pureScale® instance.
DB2_CLUSTER_HOST_STATE administrative view
The DB2_CLUSTER_HOST_STATE administrative view returns the hosts that are part of a Db2 pureScale instance. You can obtain a list of unique hosts plus their associated state information for the instance.
The schema is SYSIBMADM.
Refer to the Information returned for DB2_CLUSTER_HOST_STATE administrative view and DB2_GET_CLUSTER_HOST_STATE table for a complete list of information that can be returned.
Authorization
- SELECT privilege on the DB2_CLUSTER_HOST_STATE administrative view
- CONTROL privilege on the DB2_CLUSTER_HOST_STATE administrative view
- DATAACCESS authority
- DBADM authority
- SQLADM authority
- ACCESSCTRL authority
- SECADM authority
Example
SELECT * FROM SYSIBMADM.DB2_CLUSTER_HOST_STATE
HOSTNAME STATE INSTANCE_STOPPED ALERT
-------- ------------------------------- ---------------- --------
so1 ACTIVE NO NO
so2 ACTIVE NO NO
so3 ACTIVE NO NO
so4 ACTIVE NO NO
so5 ACTIVE NO NO
so6 ACTIVE NO NO
6 record(s) selected.
DB2_GET_CLUSTER_HOST_STATE table function
The DB2_GET_CLUSTER_HOST_STATE table function returns the same information as the DB2_CLUSTER_HOST_STATE administrative view, but allows you to specify a host name.
Refer to the Information returned for DB2_CLUSTER_HOST_STATE administrative view and DB2_GET_CLUSTER_HOST_STATE table for a complete list of information that can be returned.
Syntax
The schema is SYSPROC.
Table function parameters
-
hostname
- An optional input argument of type VARCHAR(255) that specifies the hostname in short or long form, for which records will be returned. If the IP address is provided instead, no records will be returned. If this parameter is null or an empty string (''), all records are returned.
Authorization
- EXECUTE privilege on the DB2_GET_CLUSTER_HOST_STATE table function
- DATAACCESS authority
- DBADM authority
- SQLADM authority
Default PUBLIC privilege
None
Example
SELECT * FROM TABLE(DB2_GET_CLUSTER_HOST_STATE('so3')) as T
HOSTNAME STATE INSTANCE_STOPPED ALERT
-------- ------------------------------- ---------------- --------
so3 ACTIVE NO NO
1 record(s) selected.
Information returned
Column name | Data type | Description |
---|---|---|
HOSTNAME | VARCHAR(255) | hostname - Host name monitor element |
STATE | VARCHAR(32) | The hosts state information:
|
INSTANCE_STOPPED | VARCHAR(8) | Whether the instance is stopped or not on the hosts:
|
ALERT | VARCHAR(8) | Information about alerts on the hosts:
|