DB2 Version 10.1 for Linux, UNIX, and Windows

Permitting occurrences of a workload to access the database

If you have a workload that is not permitted to access the database but now want to permit occurrences of that workload to run, alter the workload so that it is permitted to access the database. By default, when a workload is created, it is permitted to access the database.

Before you begin

To alter a workload so that it can access a database, you require WLMADM or DBADM authority.

See Workload management DDL statements for more information about prerequisites.

About this task

When you prevent a workload from accessing the database, the data server still examines that workload when performing workload assignment. However, all occurrences of that workload are rejected with an error.

Procedure

To permit a workload to access the database:

  1. Use the ALLOW DB ACCESS option of the ALTER WORKLOAD statement to permit the workload to access the database. For example, to permit a workload called WL1 to access the database, specify the following statement:
    ALTER WORKLOAD WL1 ALLOW DB ACCESS
  2. Commit your changes. When you commit your changes workload is updated in the SYSCAT.WORKLOADS view.

Results

Altering a workload to permit its occurrences to access the database takes effect when the data server analyzes the next unit of work for that workload. For example, if you specified DISALLOW DB ACCESS for workload A and alter the workload by specifying ALLOW DB ACCESS, new occurrences of workload A are permitted to execute. Previously, any occurrence of workload A would have been rejected with an error.