Rules Hierarchy for SHOW QUERY LOGGING - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

The SHOW QUERY LOGGING request 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 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.

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 in the rules cache and in DBC.LogRuleTbl. Note that these criteria allow for 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 or database name and account name the matching rule from the following set, searching in this order:

specified user name:specified account name

specified user or database name:all account names

all user names:specified account name

all user and database names:all account names

a single user or database name, without an account name the matching rule from the following set, searching in this order:

specified user or database name:all account names

all user and database names:all account names

ALL and a specific account name the matching rule from the following set, searching in this order:

all user names:specified account name

all user names:all account names

ALL, without an account name the matching rule for all user names:all account names .