Neoview Workload Management Services Guide (R2.4)

ALL EXPRESSIONS = TRUE
If the operator is OR or if there is only one rule expression, running a STATUS QUERIES WARN
command displays the rule expression as the reason for the warning. For more information, see
“Displaying Warning Information” (page 75).
If you do not specify a warning level, the default is WARN-LOW for the execution rule.
Specifying an Action for the Execution Rule
You can specify an action to take if the execution rule evaluates to true. For an execution rule,
you can specify CANCEL to cancel the query.
You must specify CANCEL if you specify NO-WARN for the warning level.
For example, this ADD RULE EXEC command defines an execution rule that cancels the query
when the execution rule evaluates to true:
ADD RULE EXEC EXECRULE4 (AND, ACCESSED_ROWS > 500, ELAPSED_TIME > 15, NO-WARN, CANCEL);
For an execution rule that specifies a warning level, if you do not specify CANCEL and the
execution rule evaluates to true, WMS saves warning information and permits the query to
continue executing.
How Cancelling a Query Affects the Transaction
When an execution rule has CANCEL as the action and evaluates to true, WMS immediately
cancels the executing query. When the query is cancelled, any uncommitted work is automatically
rolled back.
Adding a Comment for the Execution Rule
You can optionally provide a comment to describe the rule that you are creating. You must
delimit the comment in double quotes. For example, this ADD RULE EXEC command has a
comment that identifies who created the execution rule and when it was created:
ADD RULE EXEC EXECRULE6 (OR,
USED_ROWS > 20000,
ACCESSED_ROWS > 20000,
WARN-HIGH,
CANCEL) COMMENT "Created by DBA on 5/14/2009";
Displaying the Definition of an Execution Rule
Use the STATUS RULE command to display the definition of an execution rule. For example,
this STATUS RULE command displays the definition of the execution rule, EXECRULE1:
NS%status rule execrule1;
TYPE NAME OPER EXPR_PRTY EXPR WARN_LEVEL ACT COMMENT
---- ----------- ---- ----------- ------------------------- ---------- ----------------------- -----------------
EXEC EXECRULE1 AND 1 USED_ROWS >= 10000 HIGH CANCEL
--- WMS operation complete.
NS%
For the syntax, see the “STATUS RULE Command” (page 138). Also see “How to Execute WMS
Commands in NCI” (page 25).
Displaying the Definitions of All Execution Rules
Use the STATUS RULE EXEC command to display the definitions of all execution rules in WMS:
NS%status rule exec;
TYPE NAME OPER EXPR_PRTY EXPR WARN_LEVEL ACT COMMENT
---- ---------- ---- ----------- ---------------------------- ---------- --------------------- -------------
EXEC EXECRULE1 AND 1 USED_ROWS >= 10000 HIGH CANCEL
EXEC EXECRULE2 AND 1 USED_ROWS >= 1000 MEDIUM
EXEC EXECRULE3 AND 1 USED_ROWS > EST_USED_ROWS LOW
Execution Rules 63