Dropping a workload removes it from the database catalog.
Procedure
To drop a workload:
- Disable the workload by specifying the ALTER WORKLOAD statement.
See
Disabling a workload for more information.
Disabling the workload prevents new occurrences of the workload from
being able to run against the database.
- Ensure that no occurrences of
this workload are running by using the WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES
table function.
For more information, see
WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES table function.
The
WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES table function returns the application handles
corresponding to the active workload occurrences. You can use the FORCE
APPLICATION command to terminate the applications using the application
handles.
- Drop the workload by specifying the DROP WORKLOAD statement.
For example, to drop the ACCTNG workload, specify the following
statement:
DROP WORKLOAD ACCTNG
- Commit your changes.
When you commit your
changes, the workload is removed from the SYSCAT.WORKLOADS view. In
addition, authorization information for the workload is removed from
the SYSCAT.WORKLOADAUTH view.