SQL Statements to Control Logging - Teradata Database

Teradata Database Administration

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
Product Category
Software

Start and stop logging with the Teradata SQL statements BEGIN QUERY LOGGING, REPLACE QUERY LOGGING, and END QUERY LOGGING. Only a user with EXECUTE privilege on DBC.DBQLAccessMacro can execute the statements. (You can also use Teradata Administrator or Teradata Studio to control query logging.)

Note: You cannot issue a BEGIN/REPLACE/END QUERY LOGGING statement while running in ANSI session mode. In Teradata session mode, you cannot issue a BEGIN/REPLACE/END QUERY LOGGING statement within a BT/ET transaction. Instead, use these statements outside a BT/ET transaction or, for ANSI session mode, log off and set the transaction mode to Teradata session mode.