This function returns basic statistics of one or more service subclasses.
This function returns detailed information about a specific activity identified by its application handle, unit of work ID, and activity ID. This information includes details about any thresholds that the activity has violated.
>>-WLM_GET_ACTIVITY_DETAILS--(--application_handle--,--uow_id--,--> >--activity_id--,--dbpartitionnum--)---------------------------><
The schema is SYSPROC.
EXECUTE privilege on the WLM_GET_ACTIVITY_DETAILS function.
SELECT SUBSTR(CHAR(DBPARTITIONNUM),1,4) AS PART,
SUBSTR(NAME, 1, 20) AS NAME,
SUBSTR(VALUE, 1, 30) AS VALUE
FROM TABLE(WLM_GET_ACTIVITY_DETAILS(1, 1, 5, -2)) AS ACTDETAIL
WHERE NAME IN ('APPLICATION_HANDLE',
'COORD_PARTITION_NUM',
'LOCAL_START_TIME',
'UOW_ID',
'ACTIVITY_ID',
'PARENT_UOW_ID',
'PARENT_ACTIVITY_ID',
'ACTIVITY_TYPE',
'NESTING_LEVEL',
'INVOCATION_ID',
'ROUTINE_ID')
ORDER BY PART
PART NAME VALUE
---- -------------------- ------------------------------
0 APPLICATION_HANDLE 1
0 COORD_PARTITION_NUM 0
0 LOCAL_START_TIME 2005-11-25-18.52.49.343000
0 UOW_ID 1
0 ACTIVITY_ID 5
0 PARENT_UOW_ID 1
0 PARENT_ACTIVITY_ID 3
0 ACTIVITY_TYPE READ_DML
0 NESTING_LEVEL 0
0 INVOCATION_ID 1
0 ROUTINE_ID 0
1 APPLICATION_HANDLE 1
1 COORD_PARTITION_NUM 0
1 LOCAL_START_TIME 2005-11-25-18.52.49.598000
1 UOW_ID 1
1 ACTIVITY_ID 5
1 PARENT_UOW_ID
1 PARENT_ACTIVITY_ID
1 ACTIVITY_TYPE READ_DML
1 NESTING_LEVEL 0
1 INVOCATION_ID 1
1 ROUTINE_ID 0
An ACTIVITY_STATE of QUEUED means that the coordinator activity has made a RPC to the catalog partition to obtain threshold tickets and has not yet received a response. Seeing this state might indicate that the activity has been queued by WLM or, over short periods of time, might just indicate that the activity is in the process of obtaining its tickets. To obtain a more accurate picture of whether or not the activity is really being queued, one can determine which agent is working on the activity (using the WLM_GET_SERVICE_CLASS_AGENTS table function) and find out whether this agent's event_object at the catalog partition has a value of WLM_QUEUE.
Column Name | Data Type | Description |
---|---|---|
DBPARTITIONNUM | SMALLINT | Partition number from which this record was collected. |
NAME | VARCHAR(256) | Element name. See Table 2 and Table 3 for possible values. |
VALUE | VARCHAR(1024) | Element values. See Table 2 and Table 3 for possible values. |
Element Name | Description | |
---|---|---|
ACTIVITY_ID | Unique activity identifier within an application. | activity_id - Activity ID monitor element |
ACTIVITY_STATE | Possible values include:
|
activity_state - Activity state monitor element |
ACTIVITY_TYPE | Possible values include:
|
activity_type - Activity type monitor element |
APPLICATION_HANDLE | A system-wide unique ID for the application. On a single-partitioned database, this identifier consists of a 16 bit counter. On a multi-partitioned database, this identifier consists of the coordinating partition number concatenated with a 16 bit counter. In addition, this identifier will be the same on every partition where the application may make a secondary connection. | application_handle - Application handle monitor element |
COORD_PARTITION_NUM | The coordinator partition of the activity. | coord_partition_num - Coordinator partition number monitor element |
DATABASE_WORK_ACTION_SET_ID | If this activity has been mapped to a work action set that has been applied to the database, this column contains the ID of the work action set. This column contains 0 if the activity has not been mapped to a work action set that has been applied to the database. | |
DATABASE_WORK_CLASS_ID | If this activity has been mapped to a work action set that has been applied to the database, this column contains the ID of the work class of this activity. This column contains 0 if the activity has not been mapped to a work action set that has been applied to the database. | |
EFFECTIVE_ISOLATION | The effective isolation level for this activity. | effective_isolation - Effective isolation monitor element |
EFFECTIVE_LOCK_TIMEOUT | The effective lock timeout value for this activity. | effective_lock_timeout - Effective lock timeout monitor element |
EFFECTIVE_QUERY_DEGREE | The effective value of query degree for this activity. | effective_query_degree - Effective query degree monitor element |
ENTRY_TIME | The time that this activity arrived into the system. | entry_time - Entry time monitor element |
INVOCATION_ID | An identifier that distinguishes one invocation of a routine from others at the same nesting level within a unit of work. It is unique within a unit of work for a specific nesting level. | invocation_id - Invocation ID monitor element |
LAST_REFERENCE_TIME | Every time a request occurs in this activity, this field is updated. | last_reference_time - Last reference time monitor element |
LOCAL_START_TIME | The time that this activity began doing work on the partition. It is in local time. This field can be an empty string when an activity has entered the system but is in a queue and has not started executing. | local_start_time - Local start time monitor element |
NESTING_LEVEL | This represents the nesting level of this activity. Nesting level is the depth to which this activity is nested within its top-most parent activity. | nesting_level - Nesting level monitor element |
PACKAGE_NAME | If the activity is a SQL statement, this represents the name of its package. | package_name - Package name monitor element |
PACKAGE_SCHEMA | If the activity is a SQL statement, this represents the schema name of its package. | package_schema - Package schema monitor element |
PACKAGE_VERSION_ID | If the activity is a SQL statement, this represents the version of its package. | package_version_id - Package version monitor element |
PARENT_ACTIVITY_ID | Unique activity identifier within a unit of work for the parent of the activity whose ID is ACTIVITY_ID. Returns an empty string if the activity has no parent activity. | parent_activity_id - Parent activity ID monitor element |
PARENT_UOW_ID | Unique unit of work identifier within an application. Refers to the original unit of work this activity's parent activity started in. Returns an empty string if the activity has no parent activity or when at a remote partition. | |
QP_QUERY_ID | The query ID assigned to this activity by Query Patroller if the activity is a query. A query ID of 0 indicates that Query Patroller did not assign a query ID to this activity. | qp_query_id - Query patroller query ID monitor element |
QUERY_COST_ESTIMATE | Estimated cost, in timerons, for a query, as determined by the SQL compiler. | query_cost_estimate - Query cost estimate monitor element |
ROUTINE_ID | Routine unique identifier. Returns zero if the activity is not part of a routine. | routine_id - Routine ID monitor element |
ROWS_FETCHED | This is the number of rows read from the table. This reports only those values for the database partition for which this record is recorded. In a partitioned database environment, these values may not reflect the correct totals for the whole activity. When the statement monitor switch is not turned on, this element is not collected and -1 is written instead. | rows_fetched - Rows fetched monitor element |
ROWS_MODIFIED | This is the number of rows inserted, updated, or deleted. This reports only those values for the database partition for which this record is recorded. In a partitioned database environment, these values may not reflect the correct totals for the whole activity. When the statement monitor switch is not turned on, this element is not collected and -1 is written instead. | rows_modified - Rows modified monitor element |
SECTION_NUMBER | If the activity is a SQL statement, this represents its section number. | section_number - Section number monitor element |
SERVICE_CLASS_ID | Unique identifier of the service class to which this activity belongs. | service_class_id - Service class ID monitor element |
SERVICE_CLASS_WORK_ACTION_SET_ID | If this activity has been mapped to a work action set that has been applied to a service class, this column contains the ID of the work action set. This column contains 0 if the activity has not been mapped to a work action set that has been applied to a service class. | |
SERVICE_CLASS_WORK_CLASS_ID | If this activity has been mapped to a work action set that has been applied to a service class, this column contains the ID of the work class of this activity. This column contains 0 if the activity has not been mapped to a work action set that has been applied to a service class. | |
STMT_PKG_CACHE_ID | Statement package cache identifier. | stmt_pkgcache_id - Statement package cache identifier monitor element |
STMT_TEXT | If the activity is dynamic SQL or it is static SQL for which the statement text is available, this field contains the first 1024 characters of the statement text. It is an empty string otherwise. | stmt_text - SQL statement text monitor element |
SYSTEM_CPU_TIME | The total system CPU time (in seconds and microseconds) used by the database manager agent process, the unit of work, or the statement. When either the statement monitor switch or the timestamp switch is not turned on, this element is not collected and -1 is written instead. | system_cpu_time - System CPU time monitor element |
UOW_ID | Unique unit of work identifier within an application. Refers to the original unit of work this activity started in. | uow_id - Unit of work ID monitor element |
USER_CPU_TIME | The total user CPU time (in seconds and microseconds) used by the database manager agent process, the unit of work, or the statement. When either the statement monitor switch or the timestamp switch is not turned on, this element is not collected and -1 is written instead. | user_cpu_time - User CPU time monitor element |
UTILITY_ID | If the activity is a utility, this is its utility ID. Otherwise, this field is 0. | utility_id - Utility ID monitor element |
The following elements are returned only if the corresponding thresholds apply to the activity.
Element Name | Description | |
---|---|---|
ACTIVITYTOTALTIME_THRESHOLD_ID | The ID of the ACTIVITYTOTALTIME threshold that was applied to the activity. | activitytotaltime_threshold_id - Activity total time threshold ID monitor element |
ACTIVITYTOTALTIME_THRESHOLD_VALUE | A timestamp that is computed by adding the ACTIVITYTOTALTIME threshold duration to the activity entry time. If the activity is still executing when this timestamp is reached, the threshold will be violated. | activitytotaltime_threshold_value - Activity total time threshold value monitor element |
ACTIVITYTOTALTIME_THRESHOLD_VIOLATED | 'Yes' indicates that the activity violated the ACTIVITYTOTALTIME threshold. 'No' indicates that the activity has not yet violated the threshold. | activitytotaltime_threshold_violated - Activity total time threshold violated monitor element |
CONCURRENTDBCOORDACTIVITIES_DB |
The ID of the CONCURRENTDBCOORDACTIVITIES_DB threshold that was applied to the activity. | |
CONCURRENTDBCOORDACTIVITIES_DB |
'Yes' indicates that the activity was queued by the CONCURRENTDBCOORDACTIVITIES_DB threshold. 'No' indicates that the activity was not queued. | |
CONCURRENTDBCOORDACTIVITIES_DB |
The upper bound of the CONCURRENTDBCOORDACTIVITIES_DB threshold that was applied to the activity. | |
CONCURRENTDBCOORDACTIVITIES_DB |
'Yes' indicates that the activity violated the CONCURRENTDBCOORDACTIVITIES_DB threshold. 'No' indicates that the activity has not yet violated the threshold. | |
CONCURRENTDBCOORDACTIVITIES_SUBCLASS |
The ID of the CONCURRENTDBCOORDACTIVITIES_SUBCLASS threshold that was applied to the activity. | |
CONCURRENTDBCOORDACTIVITIES_SUBCLASS |
'Yes' indicates that the activity was queued by the CONCURRENTDBCOORDACTIVITIES_SUBCLASS threshold. 'No' indicates that the activity was not queued. | |
CONCURRENTDBCOORDACTIVITIES_SUBCLASS |
The upper bound of the CONCURRENTDBCOORDACTIVITIES_SUBCLASS threshold that was applied to the activity. | |
CONCURRENTDBCOORDACTIVITIES_SUBCLASS |
'Yes' indicates that the activity violated the CONCURRENTDBCOORDACTIVITIES_SUBCLASS threshold. 'No' indicates that the activity has not yet violated the threshold. | |
CONCURRENTDBCOORDACTIVITIES_SUPERCLASS |
The ID of the |
|
CONCURRENTDBCOORDACTIVITIES_SUPERCLASS |
'Yes' indicates that the activity was queued by |
|
CONCURRENTDBCOORDACTIVITIES_SUPERCLASS |
The upper bound of the |
|
CONCURRENTDBCOORDACTIVITIES_SUPERCLASS |
'Yes' indicates that the activity violated the |
|
CONCURRENTDBCOORDACTIVITIES_WORK_ACTION_SET |
The ID of the |
|
CONCURRENTDBCOORDACTIVITIES_WORK_ACTION_SET |
'Yes' indicates that the activity was queued by |
|
CONCURRENTDBCOORDACTIVITIES_WORK_ACTION_SET |
The upper bound of the |
|
CONCURRENTDBCOORDACTIVITIES_WORK_ACTION_SET |
'Yes' indicates that the activity violated the |
|
CONCURRENTWORKLOADACTIVITIES |
The ID of the CONCURRENTWORKLOADACTIVITIES threshold that was applied to the activity. | |
CONCURRENTWORKLOADACTIVITIES |
The upper bound of the CONCURRENTWORKLOADACTIVITIES threshold that was applied to the activity. | |
CONCURRENTWORKLOADACTIVITIES |
'Yes' indicates that the activity violated the CONCURRENTWORKLOADACTIVITIES threshold. 'No' indicates that the activity has not yet violated the threshold. | |
ESTIMATEDSQLCOST_THRESHOLD_ID | The ID of the ESTIMATEDSQLCOST threshold that was applied to the activity. | estimatedsqlcost_threshold_id - Estimated SQL cost threshold ID monitor element |
ESTIMATEDSQLCOST_THRESHOLD_VALUE | The upper bound of the ESTIMATEDSQLCOST threshold that was applied to the activity. | estimatedsqlcost_threshold_value - Estimated SQL cost threshold value monitor element |
ESTIMATEDSQLCOST_THRESHOLD_VIOLATED | '1' indicates that the activity violated the ESTIMATEDSQLCOST threshold. '0' indicates that the activity has not yet violated the threshold. | estimatedsqlcost_threshold_violated - Estimated SQL cost threshold violated monitor element |
SQLROWSRETURNED_THRESHOLD_ID | The ID of the SQLROWSRETURNED threshold that was applied to the activity | sqlrowsreturned_threshold_id - SQL rows read returned threshold ID monitor element |
SQLROWSRETURNED_THRESHOLD_VALUE | The upper bound of the SQLROWSRETURNED threshold that was applied to the activity. | sqlrowsreturned_threshold_value - SQL rows read returned threshold value monitor element |
SQLROWSRETURNED_THRESHOLD_VIOLATED | 'Yes' indicates that the activity violated the SQLROWSRETURNED threshold. 'No' indicates that the activity has not yet violated the threshold. | sqlrowsreturned_threshold_violated - SQL rows read returned threshold violated monitor element |
SQLTEMPSPACE_THRESHOLD_ID | The ID of the SQLTEMPSPACE threshold that was applied to the activity. | sqltempspace_threshold_id - SQL temporary space threshold ID monitor element |
SQLTEMPSPACE_THRESHOLD_VALUE | The upper bound of the SQLTEMPSPACE threshold that was applied to the activity. | sqltempspace_threshold_value - SQL temporary space threshold value monitor element |
SQLTEMPSPACE_THRESHOLD_VIOLATED | 'Yes' indicates that the activity violated the SQLTEMPSPACE threshold. 'No' indicates that the activity has not yet violated the threshold. | sqltempspace_threshold_violated - SQL temporary space threshold violated monitor element |