Rule Examples

This section contains examples of several WLM rules that are created with different types. Depending on their type and logic, rules are evaluated and applied at different points in the lifecycle of a query. Keep in mind that rules are also evaluated with respect to each other. It is possible for one rule to cancel out another rule, so make sure you are aware which rules are actually being applied on your system. These examples should help you understand some of the typical behaviors with rule processing.

In some cases, the behavior shown in these examples could be emulated with security settings (ACLs) on different objects. Note that the WLM rule approach provides a conditional and temporary form of security, given that rules can be enabled or disabled, different profiles can be activated for different workloads, and so on.

While debugging rules, you may want to look at the information logged in the sys.query_rule_event view:
select * from sys.query_rule_event where rule_name='new_rule_name';