Rules Hierarchy for SHOW QUERY LOGGING - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2024-12-13
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jbg1472252759029
lifecycle
latest
Product Category
Teradata Vantage™

When you submit a SHOW QUERY LOGGING request, it searches the rules cache and DBC.LogRuleTbl in the following order for a match:

Order in Hierarchy Type of Rule
1 A rule based on an application name.
2 A rule for this specific user and specific account.
3 A rule for this specific user and any account.
4 A rule for all users and this specific account.
5 A rule for all users and any account.

If you create multiple specific logging rules that match a rule type, Vantage places them within each rule type in the hierarchy in the order they are created.

Vantage uses the following criteria to determine how to match SHOW QUERY LOGGING requests with the rules that exist in the rules cache and in DBC.LogRuleTbl. Note that these criteria handle conditions where the request does not match any specific rules in the rules cache or DBC.LogRuleTbl.

IF you specify … THEN the request searches for the following single best fit rule …
an application name the matching application name rule.
a single user name and account name the matching rule from the following set, searching in the order indicated:
  1. specified user name:specified account name
  2. specified user name:ALL account names
  3. ALL user names:specified account name
  4. ALL user names:ALL account names
a single user name, but no account name the matching rule from the following set, searching in the order indicated:
  1. specified user name:ALL account names
  2. ALL user names:ALL account names
ALL and a specific account name the matching rule from the following set, searching in the order indicated:
  1. ALL user names:specified account name
  2. ALL user names:ALL account names
ALL, but no account name the matching ALL user names:ALL account names rule.