WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES_V97 table function - List of workload occurrences
The WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES_V97 function returns the list of all workload occurrences running in a specified service class on a particular member. A workload occurrence is a specific database connection whose attributes match the definition of a workload and hence is associated with or assigned to the workload.
A workload occurrence is a specific database connection whose attributes match with the definition of a workload and hence is associated with or assigned to the workload.
Syntax
The schema is SYSPROC.
Table function parameters
-
service_superclass_name
- An input argument of type VARCHAR(128) that specifies the name of a service superclass in the currently connected database. If the argument is null or an empty string, the data is retrieved for all the superclasses in the database that match the values of the other parameters. service_subclass_name
- Target service subclass for the workload occurrence. Any work submitted by this workload occurrence will run in this service subclass under the target service superclass with the exception of activities that are mapped, or remapped, to a different subclass. member
- An input argument of type INTEGER that specifies the number of a member in the same instance as the currently connected database. Specify -1 for the current database member, or -2 for all database members. If the null value is specified, -1 is set implicitly.
Authorization
- EXECUTE privilege on the routine
- DATAACCESS authority
- DBADM authority
- SQLADM authority
- WLMADM authority
Default PUBLIC privilege
None
Example
If an administrator wants to see what workload occurrences are running on the system as a whole, the administrator can call the WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES_V97 function by specifying a null value or an empty string for service_superclass_name and service_subclass_name and -2 for member:
SELECT SUBSTR(SERVICE_SUPERCLASS_NAME,1,19) AS SUPERCLASS_NAME,
SUBSTR(SERVICE_SUBCLASS_NAME,1,18) AS SUBCLASS_NAME,
SUBSTR(CHAR(DBPARTITIONNUM),1,4) AS PART,
SUBSTR(CHAR(COORD_PARTITION_NUM),1,4) AS COORDPART,
SUBSTR(CHAR(APPLICATION_HANDLE),1,7) AS APPHNDL,
SUBSTR(WORKLOAD_NAME,1,22) AS WORKLOAD_NAME,
SUBSTR(CHAR(WORKLOAD_OCCURRENCE_ID),1,6) AS WLO_ID
FROM TABLE(WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES_V97
(CAST(NULL AS VARCHAR(128)), CAST(NULL AS VARCHAR(128)), -2))
AS SCINFO
ORDER BY SUPERCLASS_NAME, SUBCLASS_NAME, PART, APPHNDL,
WORKLOAD_NAME, WLO_ID
If the system has four database members and is currently running two workloads, the previous query produces results such as the following ones:
SUPERCLASS_NAME SUBCLASS_NAME PART COORDPART ...
------------------- ------------------ ---- --------- ...
SYSDEFAULTMAINTENAN SYSDEFAULTSUBCLASS 0 0 ...
SYSDEFAULTSYSTEMCLA SYSDEFAULTSUBCLASS 0 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 0 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 0 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 1 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 1 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 2 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 2 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 3 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 3 0 ...
... APPHNDL WORKLOAD_NAME WLO_ID
... ------- ---------------------- ------
... - - -
... - - -
... 1 SYSDEFAULTUSERWORKLOAD 1
... 2 SYSDEFAULTUSERWORKLOAD 2
... 1 SYSDEFAULTUSERWORKLOAD 1
... 2 SYSDEFAULTUSERWORKLOAD 2
... 1 SYSDEFAULTUSERWORKLOAD 1
... 2 SYSDEFAULTUSERWORKLOAD 2
... 1 SYSDEFAULTUSERWORKLOAD 1
... 2 SYSDEFAULTUSERWORKLOAD 2
Usage note
The parameters are, in effect, ANDed together. That is, if you specify conflicting input parameters, such as a service superclass SUP_A and a subclass SUB_B such that SUB_B is not a subclass of SUP_A, no rows are returned.