Use the CREATE WORK ACTION SET statement or the ALTER WORK
ACTION SET statement to create a work action.
Before you begin
To create a work action, you require WLMADM
or DBADM authority.
For additional prerequisites, see the following
topics:
When you create a work action:
- You associate a work action with a work class. The work class
must already exist in the work class set that the work action set
is applied to.
- If the work action is a threshold, the work action set must be
defined for a workload or for the database. For the list of supported
thresholds for work actions, see Thresholds that can be used in work actions.
- If you are creating a mapping work action, the work action set
must be defined for a service superclass. The service subclass being
mapped to must already exist in the service superclass this work action
set is being defined for. In addition, you cannot specify the default
service subclass.
- More than one work action can be applied to a single work class,
but they must be different work action types. For example, you can
apply a mapping work action and a collect work action to the same
work class. You can, however, only apply one work action of the same
type to the same work class. For example, you cannot apply more than one mapping
work action to the same work class. The one exception to this is if
the work action represents a threshold. You can apply more than one
threshold work action to a single work class but each threshold must
be of a different type.
- If you are creating a collect aggregate activity data work action,
the work action set must be defined for a service superclass or a
workload.
Procedure
To create a work action:
- Use the work-action-definition keyword
of the CREATE WORK ACTION SET statement, or the ADD work-action-definition keyword
of the ALTER WORK ACTION SET statement. Specify one or
more of the following for the work action:
- Commit your changes. When you commit your
changes, the work action is added to the SYSCAT.WORKACTIONS view.
If the work action is a threshold, the threshold is added to the SYSCAT.THRESHOLDS
view.
A new work action takes effect in the database only after
it is committed, and does not affect any database activities currently
running.