Db2 workload management stored procedures
You can use stored procedures for canceling an activity, capturing details about an activity, resetting the statistics on Db2 workload management objects, setting client information at the data server, and changing the session priority of an application.
The following stored procedures are available for use with Db2 workload management:
- WLM_CANCEL_ACTIVITY(application_handle, uow_id, activity_id)
- Use this stored procedure to cancel a running or queued activity. You identify the activity by its application handle, unit of work identifier, and activity identifier. You can cancel any type of activity. The application with the cancelled activity receives the error SQL4725N.
- WLM_CAPTURE_ACTIVITY_IN_PROGRESS(application_handle, uow_id, activity_id)
- Use this stored procedure to send information about an individual activity that is currently executing to the activities event monitor. This stored procedure sends the information immediately, rather than waiting until the activity completes.
- WLM_COLLECT_STATS()
- Use this stored procedure to collect and reset statistics for Db2 workload management objects. All statistics tracked for service classes, workloads, threshold queues, and work action sets are sent to the active statistics event monitor (if one exists) and reset. If there is no active statistics event monitor, the statistics are only reset, but not collected.
- WLM_SET_CLIENT_INFO(client_userid, client_wrkstnname,client_applname, client_acctstr,client_workload)
- Use this procedure to set the client information attributes used at the data server to record the identity of the application or user currently using the connection. In cases where middleware exists between applications or users and your data server, use the WLM_SET_CLIENT_INFO procedure to set distinguishing connection attributes explicitly.
- WLM_SET_SESSION_PRIORITY(application_handle, priority)
- Use this stored procedure to permanently set the priority of a session explicitly to 'LOW', 'MEDIUM', 'HIGH', 'CRITICAL', or back to its default setting by using 'DEFAULT'. Any priority that is explicitly specified by using WLM_SET_SESSION_PRIORITY() overrides the priority that is defined on the workload that is associated with the connection that is running with the specified application_handle.