Review Rules | Teradata Vantage - Reviewing Rules - Analytics Database - Teradata Vantage

Database Administration

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-11-03
dita:mapPath
pgf1628096104492.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ujp1472240543947
lifecycle
latest
Product Category
Teradata Vantage™
You can review DBQL rules one of two ways:
  • Use the SHOW QUERY LOGGING statement to determine which rule would be used 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 what kind of rules the system checks for 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 execute the SHOW QUERY LOGGING statement.
IF you submit a SHOW QUERY LOGGING statement for… THEN the system will show…
ALL the first rule in the hierarchy that applies, looking only at all/all accounts
user1 acct1 the first rule in the hierarchy that applies, looking at:
  • user1/account1
  • user1/all accounts
  • all/account1
  • all/all accounts
user2 the first rule in the hierarchy that applies, looking only at:
  • user2/all accounts
  • all/all accounts
all acct3 the rule hierarchy (in hierarchy order) that would apply for any user that logged on under acct 3. The system will look only at:
  • all/account3
  • all/all accounts
APPLNAME='xxx' 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 would be applied by the system. Only a user with SELECT privilege on DBC.DBQLRules[V] can access the view. For Teradata systems configured with Teradata Secure Zones, access to some Data Dictionary views is constrained by zone. DBQLRules[V] is constrained by zone. For more information, see Teradata Vantage™ - Data Dictionary, B035-1092.

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

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