Triggers | Privileges Needed for Database Administration | Teradata Vantage - Triggers - Analytics Database - Teradata Vantage

Security Administration

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-11-02
dita:mapPath
hjo1628096075471.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
zuy1472246340572
lifecycle
latest
Product Category
Teradata Vantageā„¢

Creating or replacing a trigger does not grant trigger-related privileges to either the creator or the immediate owner of that trigger.

You cannot grant privileges on a trigger, only on the database or table to which the trigger applies.
To... the user must have the...
create a trigger
  • CREATE TRIGGER on both of the following:
    • The database in which the trigger is created
    • Either the subject table or its containing database
  • SELECT on any column referenced in a WHEN clause or a triggered SQL statement subquery
  • INSERT, UPDATE, or DELETE on the triggered SQL statement target table (depending on the triggered action).
  • privileges that would normally be required to run the individual triggered SQL statements
replace a trigger
  • DROP TRIGGER on the subject table or the database

    The exception is when you use REPLACE TRIGGER when no target trigger exists and you instead create a trigger, in which case you need CREATE TRIGGER privilege on both of the following:

    • The database in which the trigger is created
    • Either the subject table or its containing database
  • SELECT on any column referenced in a WHEN clause or a triggered SQL statement subquery
  • Depending on the triggered SQL statement, INSERT, UPDATE, or DELETE on the triggered SQL statement target table
  • privileges that would normally be required to run the individual triggered SQL statements
drop a trigger DROP TRIGGER privilege on the subject table or the database containing the table
run a trigger privileges required for running triggering statements.
In addition, the immediate owner of the trigger must have:
  • CREATE TRIGGER on the subject table or the database containing the table.
  • SELECT on any column referenced in the WHEN clause of the CREATE TRIGGER statement, or any column in a triggered action statement that requires read access for the statement.