DB2 Version 9.7 for Linux, UNIX, and Windows

SNAPSHOT_APPL_INFO table function

Returns general information from an application snapshot.

Note: This table function has been deprecated and replaced by the SNAP_GET_APPL_INFO table function - Retrieve appl_info logical data group snapshot information.
Read syntax diagramSkip visual syntax diagram
>>-SNAPSHOT_APPL_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 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.

If both parameters are set to NULL, the snapshot will be taken only if a file has not previously been created by the SNAPSHOT_FILEW stored procedure for the corresponding snapshot API request type.

Authorization

One of the following authorizations is required:
  • EXECUTE privilege on the SNAPSHOT_APPL_INFO table function
  • DATAACCESS authority
To access snapshot monitor data, one of the following authorizations is also required:
  • SYSMON authority
  • SYSCTRL authority
  • SYSMAINT authority
  • SYSADM authority

Default PUBLIC privilege

In a non-restrictive database, EXECUTE privilege is granted to PUBLIC when the function is automatically created.

The function returns a table as shown in the following section:

Table 1. Information returned by the SNAPSHOT_APPL_INFO table function
Column name Data type Description or corresponding monitor element
SNAPSHOT_TIMESTAMP TIMESTAMP snapshot_timestamp - Snapshot timestamp
AGENT_ID BIGINT agent_id - Application handle (agent ID)
APPL_STATUS BIGINT appl_status - Application status
CODEPAGE_ID BIGINT codepage_id - ID of code page used by application
NUM_ASSOC_AGENTS BIGINT num_assoc_agents - Number of associated agents
COORD_PARTITION_NUM SMALLINT coord_node - Coordinating node
AUTHORITY_LVL BIGINT authority_lvl - User authorization level
CLIENT_PID BIGINT client_pid - Client process ID
COORD_AGENT_PID BIGINT coord_agent_pid - Coordinator agent
STATUS_CHANGE_TIME TIMESTAMP status_change_time - Application status change time
CLIENT_PLATFORM SMALLINT client_platform - Client operating platform
CLIENT_PROTOCOL SMALLINT client_protocol - Client communication protocol
COUNTRY_CODE SMALLINT territory_code - Database territory code
APPL_NAME VARCHAR(256) appl_name - Application name
APPL_ID VARCHAR(128) appl_id - Application ID
SEQUENCE_NO VARCHAR(4) sequence_no - Sequence number
AUTH_ID VARCHAR(128) auth_id - Authorization ID
CLIENT_NNAME VARCHAR(128) The client_nname monitor element is deprecated. The value returned is not a valid value.
CLIENT_PRDID VARCHAR(128) client_prdid - Client product/version ID
INPUT_DB_ALIAS VARCHAR(128) input_db_alias - Input database alias
CLIENT_DB_ALIAS VARCHAR(128) client_db_alias - Database alias used by application
DB_NAME VARCHAR(128) db_name - Database name
DB_PATH VARCHAR(1024) db_path - Database path
EXECUTION_ID VARCHAR(128) execution_id - User login ID
CORR_TOKEN VARCHAR(128) corr_token - DRDA® correlation token
TPMON_CLIENT_USERID VARCHAR(256) tpmon_client_userid - TP monitor client user ID
TPMON_CLIENT_WKSTN VARCHAR(256) tpmon_client_wkstn - TP monitor client workstation name
TPMON_CLIENT_APP VARCHAR(256) tpmon_client_app - TP monitor client application name
TPMON_ACC_STR VARCHAR(200) tpmon_acc_str - TP monitor client accounting string