Enabling a workload

The Db2® data server checks the connection attributes specified for a workload against the connection attributes of the current session. The data server does not consider a disabled workload when it looks for a matching workload.

Before you begin

To alter a workload, you require WLMADM or DBADM authority.

See Workload management DDL statements for more information about prerequisites.

About this task

By default, a workload is enabled when you create it. If you create a workload as disabled, you must enable it for the data server to consider the workload when it performs workload evaluation.

Procedure

To enable a workload:

  1. Identify the workload that you want to enable.
    You can display the set of disabled workloads by querying the SYSCAT.WORKLOADS view, as shown in the following example:
    SELECT * FROM SYSCAT.WORKLOADS WHERE ENABLED='N'
  2. Use the ALTER WORKLOAD statement to enable the disabled workload:
    ALTER WORKLOAD...ENABLE
    If the ALTER WORKLOAD statement is successful, the definition for the workload is written to the database catalog.
  3. Commit your changes.
    When you commit your changes the workload is updated in the SYSCAT.WORKLOADS view.

Results

Enabling a workload takes effect at the beginning of the next unit of work. At that point, a workload reevaluation occurs, and the data server considers the newly enabled workload when it performs workload reevaluation.