BEGIN LOGGING SQL Statement | Teradata Database - BEGIN LOGGING - Teradata Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Database
Release Number
20.00
Publication Date
June 2025
Content Type
SQL Reference
Publication ID
B035-1144-200K
ft:locale
en-US
ft:lastEdition
2026-09-23
dita:mapPath
mbm1747160743883.ditamap
dita:ditavalPath
jlp1749501702948.ditaval
ft:sourceId
dita
dita:id
mdr1472255012272
lifecycle
latest

Starts the auditing of SQL requests that attempt to access data.

The system creates a log entry when it checks privileges on the SQL request. For a detailed description of access logging options and use cases, see Security Administration, B035-1100.

ANSI Compliance

This statement is a Teradata extension to the ANSI SQL:2011 standard.

Other SQL dialects support similar non-ANSI standard statements with names such as START LOGGING.

Required Privileges

You must have the EXECUTE privilege on the DBC.AccLogRule macro to use the BEGIN LOGGING statement to initiate access logging on database objects and operations.

Privileges Granted Automatically

None.

Prerequisites

When you initially set up logging, before you can use the BEGIN LOGGING statement, you must run the DIPACC script to create the DBC.ACCLogRule macro, which allows you to create logging rules in the DBC.AccLogRuleTbl using BEGIN LOGGING statements. For more information, see Security Administration, B035-1100.