Determining Whether an Account Was Specified for BEGIN QUERY LOGGING - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

If you begin query logging on a specific account or account set, then you must perform one of the following actions to end query logging for that account or account set.

TO end query logging for … You must submit the following as the object of the ON clause in an END QUERY LOGGING request…
only a specified account or account set for a specific user the name of that account

or

the names of some or all of the accounts in the account set

This option deletes all rules for the specified account set for user_name.

all rules for all users ALL RULES

This option deletes all rules from DBC.DBQLRuleTbl, sets logging off for all active sessions, and clears all rules from the rules cache.

You can determine whether an account has been specified explicitly or not by submitting the following query against the DBQLRulesV view.

     SELECT *
     FROM DBQLRulesV;

This query reports all active rules, including whether accounts are specified for them or not.