16.20 - Example: Fine Tuning Query Logging Rules - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

Create a logging rule for myuser2 and include the WITH NONE option:

     BEGIN QUERY LOGGING WITH SQL ON ALL;
     BEGIN QUERY LOGGING WITH NONE ON myuser2 ACCOUNT='sales';

Create a logging rule for myuser2 to capture step data in DBQLStepTbl. Submit an END QUERY LOGGING request to remove the existing rule before adding the new rule:

     END QUERY LOGGING ON myuser2 ACCOUNT='sales';

This request creates the new rule:

     BEGIN QUERY LOGGING WITH STEPINFO ON myuser2 ACCOUNT='sales';

As an alternative, use a REPLACE QUERY LOGGING request instead of the END QUERY LOGGING and BEGIN QUERY LOGGING requests. See REPLACE QUERY LOGGING.