Review Rules | Database Administration | Teradata VantageCloud Lake - Reviewing Rules - Teradata VantageCloud Lake

Lake - Database Reference

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
ohi1683672393549.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
ohi1683672393549
You can review DBQL rules one of two ways:
  • Use the SHOW QUERY LOGGING statement to determine which rule to use for a specified user/account/application. For example:
    SHOW QUERY LOGGING ON marketinguser;
  • Use the DBC.DBQLRules[V] view as a window into the contents of the DBC.RuleTbl which stores all DBQL rules in the system.

The following table describes the rules the system checks, depending on the SHOW QUERY LOGGING statement you submit. If you only list a user name or an account string, the SHOW QUERY LOGGING statement shows the Best Fit Rule.

Only a user with EXECUTE privilege on DBC.DBQLAccessMacro can run the SHOW QUERY LOGGING statement.
SHOW QUERY LOGGING Option Result
ALL System shows the first rule in the hierarchy that applies, looking only at all/all accounts
User1 acct1 System shows the first rule in the hierarchy that applies, looking at:
  • User1/acct1
  • User1/all accounts
  • ALL/acct1
  • ALL/all accounts
User2 System shows the first rule in the hierarchy that applies, looking only at:
  • User2/all accounts
  • ALL/all accounts
ALL acct3 System shows the rule hierarchy (in hierarchy order) that applies for any user that logged on under acct 3. The system looks only at:
  • ALL/acct3
  • ALL/all accounts
APPLNAME='xxx' System shows APPLNAME='xxx', which is the only APPLNAME rule that applies.

The DBC.DBQLRules[V] view provides a window into the contents of the DBQLRuleTbl table and shows which rules the system applies. Only a user with SELECT privilege on DBC.DBQLRules[V] can access the view. For more information, see DBQLRulesV.

A SELECT on the DBQLRules[V] view displays the rules in effect. You can qualify the response by user name, or account string (if any), or both. For example:

SELECT * FROM DBC.DBQLRULESV WHERE ACCOUNTSTRING='$L00Test&D&H';