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.
Supported utilities include the following:
Authorization
One of the following authorizations
is required:
- EXECUTE privilege on the routine
- DATAACCESS authority
- DBADM authority
- SQLADM authority
Default PUBLIC privilege
None
Syntax
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
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