MON_GET_INSTANCE table function - Get instance level information

The MON_GET_INSTANCE table function returns information about the database instance level.

Authorization

One of the following authorizations is required:
  • EXECUTE privilege on the routine
  • DATAACCESS authority
  • DBADM authority
  • SQLADM authority

Default PUBLIC privilege

None

Syntax

Read syntax diagramSkip visual syntax diagramMON_GET_INSTANCE(member)

The schema is SYSPROC.

Routine parameters

member
An input parameter of type INTEGER that specifies a valid database member from which the records should be fetched. Specify -1 or null for the current member, or -2 for information from all active database members. An active database member is a database that is available for connection and use by applications.

Information returned

Table 1. Information returned by the MON_GET_INSTANCE routine
Column name Data type Description
MEMBER SMALLINT member - Database member monitor element
DB2_STATUS VARCHAR(12) db2_status - Status of Db2® instance monitor element
DB2START_TIME TIMESTAMP db2start_time - Start Database Manager Timestamp monitor element
TIMEZONEOFFSET INTEGER timezoneoffset - Time difference from UCT monitor element
TIMEZONEID VARCHAR(255) timezoneid - Time zone identifier monitor element
CON_LOCAL_DBASES BIGINT con_local_dbases - Local Databases with Current Connects monitor element
TOTAL_CONNECTIONS BIGINT total_connections - Total connections
AGENTS_REGISTERED BIGINT agents_registered - Agents Registered monitor element
AGENTS_REGISTERED_TOP BIGINT agents_registered_top - Maximum Number of Agents Registered monitor element
IDLE_AGENTS BIGINT idle_agents - Number of Idle Agents monitor element
AGENTS_FROM_POOL BIGINT agents_from_pool - Agents Assigned From Pool monitor element
AGENTS_CREATED_EMPTY_POOL BIGINT agents_created_empty_pool - Agents Created Due to Empty Agent Pool monitor element
NUM_COORD_AGENTS BIGINT num_coord_agents - Number of coordinator agents
COORD_AGENTS_TOP BIGINT coord_agents_top - Maximum Number of Coordinating Agents monitor element
AGENTS_STOLEN BIGINT agents_stolen - Stolen Agents monitor element
GW_TOTAL_CONS BIGINT gw_total_cons - Total Number of Attempted Connections for Db2 Connect monitor element
GW_CUR_CONS BIGINT gw_cur_cons - Current Number of Connections for Db2 Connect monitor element
GW_CONS_WAIT_HOST BIGINT gw_cons_wait_host - Number of Connections Waiting for the Host to Reply monitor element
GW_CONS_WAIT_CLIENT BIGINT gw_cons_wait_client - Number of Connections Waiting for the Client to Send Request monitor element
NUM_GW_CONN_SWITCHES BIGINT num_gw_conn_switches - Connection Switches monitor element
PRODUCT_NAME VARCHAR(32) product_name - Product Name monitor element
SERVICE_LEVEL VARCHAR(64) service_level - Service Level monitor element
SERVER_PLATFORM VARCHAR(32) server_platform - Server Operating System monitor element
NETWORK_INTERFACE_BOUND VARCHAR(255) network_interface_bound - Hostname of member representing a network interface for communications

Example

Determine the start time and total number of current connections on all members:
SELECT DB2START_TIME, TOTAL_CONNECTIONS 
   FROM TABLE (MON_GET_INSTANCE(-2)); 
This query returns the following output:
DB2START_TIME                 TOTAL_CONNECTIONS
--------------------------    --------------------
2012-09-11-15.39.05.000000                       2