Neoview Workload Management Services Guide (R2.4)
ADD RULE CONN CONNRULE21 (APPL NCI, LOGIN ROLE.USR8, WARN-LOW);
When you specify WARN-LOW, WMS sets the warning level to low and saves warning
information in its shared memory when the connection rule evaluates to true. If there is more
than one connection attribute expression, running a STATUS QUERIES WARN command reveals
the following reason for the warning:
ALL EXPRESSIONS = TRUE
This means that the connection attributes of the client session matched all the connection attribute
expressions in the connection rule.
If there is only one connection attribute 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).
Specifying an Action for the Connection Rule
You can specify one or more actions to take if the connection rule evaluates to true. For a
connection rule, the action taken can be the SQL command (or commands) that you specify in
SQL_CMD "sql-string".
If you specify more than one command, you must separate them with semicolons, with the last
command always ending in a semicolon, as this example shows:
ADD RULE CONN CONNRULE22 (APPL NCI, DSN ICASE(DSN1), WARN-LOW,
SQL_CMD "SET SCHEMA SALES; SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;");
In the example, the SET SCHEMA and SET TRANSACTION statements set the schema and
isolation level, respectively, for the client session when the connection rule evaluates to true.
If an identifier in the SQL command contains multibyte characters, you must delimit it in double
quotes, as this example shows:
ADD RULE CONN (APPL NCI, DSN ICASE(DSN1), WARN-LOW,
SQL_CMD "SET SCHEMA " "; SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;");
However, you do not need to put the name of the rule in double quotes if it contains multibyte
characters.
Adding a Comment for the Connection 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 CONN command has a
comment that identifies who created the connection rule and when it was created:
ADD RULE CONN CONNRULE24 (SESSION JOB3218) COMMENT "Created by DBA on 5/14/09";
Displaying the Definition of a Connection Rule
Use the STATUS RULE command to display the definition of a connection rule. For example,
this STATUS RULE command displays the definition of the connection rule, CONNRULE1:
NS%status rule connrule1;
TYPE NAME OPER EXPR_PRTY EXPR WARN_LEVEL ACT COMMENT
---- ---------- ---- ----------- ----------------- ---------- ---------- -------
CONN CONNRULE1 AND 1 SESSION = JOB2468 NO-WARN
CONN CONNRULE1 AND 2 LOGIN = ROLE.USR1 NO-WARN
--- WMS operation complete.
NS%
As the OPER column in the example shows, the operator is always set to AND for connection
rules. This means that all expressions in the connection rule must be true for the connection rule
to be considered true.
44 Configuring Rules