Create thresholds using the DDL statement CREATE THRESHOLD
(or the CREATE WORK ACTION SET statement). You create a threshold
to impose a limit on resource consumption.
Before you begin
To create a
threshold, you require WLMADM or DBADM authority.See the following topics for more information
about prerequisites:
To create a threshold for a work action set, use the CREATE WORK ACTION SET statement or
the ALTER WORK ACTION SET statement with the ADD WORK ACTION keywords. For more information, see
CREATE WORK ACTION SET statement or ALTER WORK ACTION SET statement.
Procedure
To create a threshold:
- Issue the CREATE THRESHOLD statement, specifying one or
more of the following properties for the threshold:
- The name of the threshold.
- The threshold domain. The threshold domain is the database object
that the threshold is both attached to and operates on. The domain
that applies depends on the type of threshold, see Threshold domain and enforcement scope for more information.
- The enforcement scope for the threshold. The threshold scope is
the enforcement range of the threshold in its domain. The enforcement
scope that applies depends on the type of threshold, see Threshold domain and enforcement scope for more information.
- Optional: Disable the threshold when it is created. By default
a threshold is created as enabled. If you create the threshold as
disabled and want to enable it later, use the ALTER THRESHOLD statement.
- The threshold predicate to specify the type of
threshold and the maximum value permitted. When the maximum value
is violated, the action specified for the threshold is enforced. For
more information on which thresholds are available to you, see Connection thresholds, Activity thresholds, Aggregate thresholds, and Unit of work thresholds.
- The actions to be taken if the maximum value for the threshold
is exceeded. The actions consist of a mandatory action that affects
the execution of the activity (STOP EXECUTION, CONTINUE, FORCE APPLICATION,
or REMAP ACTIVITY TO) and an optional collect activity action (COLLECT
ACTIVITY DATA). The options you specify for the collect activity action
determine what information is collected for the activity that caused
the threshold boundary to be violated.
- Commit your changes.
When you commit your
changes, the threshold is added to the SYSCAT.THRESHOLDS view.