ON item_list - Teradata Vantage - Analytics Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantageā„¢

One or more database objects for which access is to be logged.

If you do not specify the ON keyword object_name option in a BEGIN LOGGING statement, the system applies the other logging rules in the statement to all objects.

If you use the ON keyword option in a BEGIN LOGGING statement, you can specify logging on up to 20 objects.

The ON keyword object_name option does not apply to the CREATE PROFILE, DROP PROFILE, CREATE ROLE, or DROP ROLE operation because profiles and roles are system-level objects with no containing user or database.

When a hash or join index is used in a query plan, the system checks privileges for the base table, not the index, so you cannot specify a hash index or join index in a BEGIN LOGGING statement. Instead, specify logging for the base table.

Each object in the ON clause must be preceded by the keyword that indicates the object type: DATABASE, FUNCTION, FUNCTION MAPPING, MACRO, PROCEDURE, TABLE, TYPE, USER, or VIEW, followed by the object name.

ON DATABASE qualified_object_name
You must specify a qualified object name that includes the name of the containing database or user. For example, database_name.object_name or user_name.object_name.
ON FUNCTION qualified_object_name
You must specify a qualified object name that includes the name of the containing database or user. For example, database_name.object_name or user_name.object_name.
ON FUNCTION MAPPING qualified_object_name
You must specify a qualified object name that includes the name of the containing database or user. For example, database_name.object_name or user_name.object_name.
ON MACRO qualified_object_name
You must specify a qualified object name that includes the name of the containing database or user. For example, database_name.object_name or user_name.object_name.
ON PROCEDURE qualified_object_name
You must specify a qualified object name that includes the name of the containing database or user. For example, database_name.object_name or user_name.object_name.
ON TABLE qualified_object_name
You must specify a qualified object name that includes the name of the containing database or user. For example, database_name.object_name or user_name.object_name.
ON TYPE SYSUDTLIB.UDT_name
For TYPE objects, the specification must always be SYSUDTLIB.UDT_name.
ON USER qualified_object_name
You must specify a qualified object name that includes the name of the containing database or user. For example, database_name.object_name or user_name.object_name.
ON VIEW qualified_object_name
You must specify a qualified object name that includes the name of the containing database or user. For example, database_name.object_name or user_name.object_name.