DB2 Version 9.7 for Linux, UNIX, and Windows

SET WORKLOAD command

Specifies the workload to which the database connection is to be assigned. This command can be issued prior to connecting to a database or it can be used to reassign the current connection once the connection has been established. If the connection has been established, the workload reassignment will be performed at the beginning of the next unit of work.

Authorization

None, but see usage notes

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagram
                    .-AUTOMATIC-------------.   
>>-SET WORKLOAD TO--+-SYSDEFAULTADMWORKLOAD-+------------------><

Command parameters

AUTOMATIC
Specifies that the database connection will be assigned to a workload chosen by the workload evaluation that is performed automatically by the server.
SYSDEFAULTADMWORKLOAD
Specifies that the database connection will be assigned to the SYSDEFAULTADMWORKLOAD, allowing users with accessctrl, dataaccess, wlmadm, secadm or dbadm authority to bypass the normal workload evaluation.

Examples

To assign the connection to the SYSDEFAULTADMWORKLOAD:
SET WORKLOAD TO SYSDEFAULTADMWORKLOAD

To reset the workload assignment so that it uses the workload that is chosen by the workload evaluation performed by the server:

SET WORKLOAD TO AUTOMATIC

Usage notes

If the session authorization ID of the database connection does not have accessctrl, dataaccess, wlmadm, secadm or dbadm authority, the connection cannot be assigned to the SYSDEFAULTADMWORKLOAD and an SQL0552N error will be returned. If the SET WORKLOAD TO SYSDEFAULTADMWORKLOAD command is issued prior to connecting to a database, the SQL0552N error will be returned after the database connection has been established, at the beginning of the first unit of work. If the command is issued when the database connection has been established, the SQL0552N error will be returned at the beginning of the next unit of work, when the workload reassignment is supposed to take place.