- 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.
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:
|
user2 | the first rule in the hierarchy that applies, looking only at:
|
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:
|
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';