Enabling Logging with the BEGIN LOGGING Statement - Advanced SQL Engine - Teradata Database

Security Administration

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
ied1556235912841.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1100
lifecycle
previous
Product Category
Teradata Vantageā„¢
You can use the BEGIN LOGGING statement to start access logging. BEGIN LOGGING statements have the following results:
  • Each BEGIN LOGGING statement creates a logging rule, in the form of an entry in the DBC.AccLogRule table.
  • Each time a user request matches one of the logging rules found in the DBC.AccLogRuleTbl, the macro creates an entry in the DBC.AccLogTbl.

The basic form of the BEGIN LOGGING statement is:

BEGIN LOGGING ON [frequency] [operation] BY  username  ON  object_name  ;

where:

The Syntax Element... Specifies the...
frequency frequency with which logging of an event takes place during a session: FIRST, LAST, FIRST AND LAST, or EACH.
operation action or list of actions which, if present in a user request, triggers logging.
username name of the user (or users) for which the system logs requests.
object_name name of a database object which, if present in a user request, triggers logging.
BEGIN LOGGING parameters are optional. The absence of some parameters causes the system to use default values.

For a detailed description of BEGIN LOGGING syntax and options, see Teradata Vantageā„¢ - SQL Data Definition Language Syntax and Examples, B035-1144.