ODBC Server Reference Manual
Managing Customized Catalogs
HP NonStop ODBC Server Reference Manual—429151-002
7-78
Resource Governing Statements
Examples
The following ADD GOVERNING statement creates a governing policy entity named
q3 that lowers the execution priority to 50 if an SQL statement takes more than 60
minutes to complete:
ADD GOVERNING q3 GOV_ATTRIBUTE EXECUTION_TIME &
LIMIT_VALUE 60 GOV_ACTION "PRIORITY 50"
The following statement adds a new gov-attribute, limit-value, and
gov-action combination to the existing governing policy entity named q3:
ADD GOVERNING q3 GOV_ATTRIBUTE ESTIMATED_COST &
LIMIT_VALUE 20 GOV_ACTION STOP
If you execute both ADD GOVERNING statements shown so far in this example, q3
does not execute an SQL statement if the estimated cost is greater than 20 and lowers
the execution priority to 50 if the statement takes more than 60 minutes to complete.
A single gov-attribute can have more than one limit-value and gov-action
combination associated with it. The following statement modify q3 to commit the
transaction if the SQL statement takes more than 90 minutes to complete.
ADD GOVERNING q3 GOV_ATTRIBUTE EXECUTION_TIME &
LIMIT_VALUE 90 GOV_ACTION COMMIT
If you execute all ADD GOVERNING statements shown in this example, q3 does not
execute an SQL statement if the estimated cost is greater than 20, lowers the
execution priority to 50 if the statement takes more than 60 minutes to complete, and
stops and commits the transaction if the statement takes more than 90 minutes to
complete.
MODIFY GOVERNING
The MODIFY GOVERNING statement modifies values for existing attributes in an
existing governing policy entry. (MODIFY GOVERNING modifies values for existing
attributes. To add a new set of attribute-value pairs to an existing governing policy
entity, use ADD GOVERNING.) To execute MODIFY GOVERNING, you must be a
privileged user.
gov-name
is an alphanumeric string up to 60 characters in length that specifies the name of
the governing policy entity you want to modify.
MODIFY GOVERNING gov-name
GOV_ATTRIBUTE gov-attribute
LIMIT_VALUE limit-value
[ GOV_ACTION gov-action ]
[ LOG_QST_ON { N | Y } ]
[ UPDATE_SYSTEM_CONFIG ]