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

Teradata Vantage™ - SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1184-171K
Language
English (United States)

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.