17.20 - Enabling Logging with the BEGIN LOGGING Statement - Analytics Database - Teradata Vantage

Teradata Vantage™ - Analytics Database Security Administration - 17.20

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-03-07
dita:mapPath
hjo1628096075471.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
zuy1472246340572
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.

Basic Syntax

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

Syntax Elements

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.

Absence of the BY user_name option specifies all users (those already defined to the system as well as any defined in the future while this logging directive is in effect).

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.