Alternative Method for Listing Query Logging Rules
You can also determine the query logging rules stored in DBC.DBQLRuleTbl by submitting the following SELECT request against the DBQLRulesV view:
SELECT * FROM DBC.DBQLRulesV;
Rules Hierarchy for SHOW QUERY LOGGING
SHOW QUERY LOGGING searches the rules cache and DBC.LogRuleTbl for a match in the following order:
Order in Hierarchy | Type of Rule |
---|---|
1 | A rule based on an application name. |
2 | A rule for this user and account. |
3 | A rule for this user or database and any account. |
4 | A rule for all users with this account. |
5 | A rule for all users, databases, and any account. |
Vantage puts logging rules of the same type in creation order.
Vantage uses the following criteria to determine how to match SHOW QUERY LOGGING requests with the rules in the rules cache and DBC.LogRuleTbl. These criteria allow for conditions where the request does not match any specific rules in the rules cache or DBC.LogRuleTbl.
Specification | Rule for Which SHOW QUERY LOGGING Searches |
---|---|
Application name | Matching application name rule. |
Single user or database name and account name: { user_name | database_name} andaccount_name |
Matching rule from following, searching in this order:
|
Single user or database name, without account name: { user_name | database_name} |
Matching rule from following, searching in this order:
|
ALL account_name | Matching rule from following, searching in this order:
|
ALL | Matching rule for ALL user names:ALL account names. |