MON_GET_UTILITY table function - Get utilities running on the database

The MON_GET_UTILITY table function returns information about utilities currently running on the database.

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_UTILITY(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_UTILITY routine
Column name Data type Description
MEMBER SMALLINT member - Database member monitor element
COORD_MEMBER SMALLINT coord_member - Coordinator member monitor element
APPLICATION_HANDLE BIGINT application_handle - Application handle monitor element
APPLICATION_ID VARCHAR(128) appl_id - Application ID monitor element
APPLICATION_NAME VARCHAR(128) appl_name - Application name monitor element
SESSION_AUTH_ID VARCHAR(128) session_auth_id - Session authorization ID monitor element
CLIENT_WRKSTNNAME VARCHAR(255) client_wrkstnname - Client workstation name monitor element
CLIENT_ACCTNG VARCHAR(255) client_acctng - Client accounting string monitor element
CLIENT_USERID VARCHAR(255) client_userid - Client user ID monitor element
CLIENT_APPLNAME VARCHAR(255) client_applname - Client application name monitor element
UTILITY_INVOCATION_ID VARCHAR(32) FOR BIT DATA utility_invocation_id - Utility invocation ID monitor element
UTILITY_ID INTEGER utility_id - Utility ID

Unique to a database partition.

UTILITY_START_TIME TIMESTAMP utility_start_time - Utility start time
UTILITY_TYPE VARCHAR(16) utility_type - Utility type
UTILITY_OPERATION_TYPE CHAR(1) utility_operation_type - Utility operation type monitor element
UTILITY_INVOKER_TYPE VARCHAR(4) utility_invoker_type - Utility invoker type
UTILITY_PRIORITY INTEGER utility_priority - Utility priority

Priority if utility supports throttling, otherwise null.

OBJECT_TYPE VARCHAR(16) Type of object. One of:
  • DATABASE
  • INDEX
  • PARTITIONGROUP
  • TABLE
  • TABLESPACE
  • VIEW
OBJECT_SCHEMA VARCHAR(128) object_schema - Object schema monitor element
OBJECT_NAME VARCHAR(128) object_name - Object name monitor element
NUM_TBSPS INTEGER num_tbsps - Number of table spaces monitor element
TBSP_NAMES CLOB(5M) tbsp_names - Table space names monitor element
UTILITY_DETAIL CLOB(2M) utility_detail - Utility detail monitor element

Example

List all LOAD commands currently running on the database server and provide information about the applications and the users running the command.
SELECT COORD_MEMBER, APPLICATION_HANDLE AS APPHDL,
   SUBSTR(APPLICATION_NAME, 1, 10) AS APPNAME,
   SUBSTR(SESSION_AUTH_ID, 1, 10) AS USER,
   SUBSTR(UTILITY_DETAIL, 1, 150) AS CMD
FROM TABLE(MON_GET_UTILITY(-2)) AS T
The following result is output:
COORD_MEMBER APPHDL               APPNAME    USER       ...
------------ -------------------- ---------- ---------- ... 
           0                  736 db2bp      USER2      ...
           0                  724 db2bp      USER1      ...

... CMD
... ---------------------------------------------------------------------------- ...
... [LOADID: 63.2013-02-01-09.48.42.976823.0 (2;21)] [*LOCAL.user2.130201144359] ...
... [LOADID: 20.2013-02-01-09.43.49.510806.0 (2;20)] [*LOCAL.user1.130201144240] ...

... CMD (continued)
... ----------------------------------------------------------------------------
... OFFLINE LOAD DEL AUTOMATIC INDEXING INSERT COPY NO SCHEMA2.T2
... OFFLINE LOAD DEL AUTOMATIC INDEXING INSERT COPY NO SCHEMA1.T1