2 Day Developer > Using Triggers > Designing Triggers > Privileges Needed to Work w...
Privileges Needed to Work with Triggers |
Previous |
Next |
To create a trigger in your schema, you must have the CREATE
TRIGGER
system privilege, and one of the following:
Own the table specified in the triggering statement
Have the ALTER
privilege for the table in the triggering statement
Have the ALTER
ANY
TABLE
system privilege
The CREATE
TRIGGER
system privilege is included in predefined RESOURCE
role that has been granted to the user HR
. See "Logging in to the Database Home Page".
To create a trigger on a database, you must have the ADMINISTER
DATABASE
TRIGGER
privilege. If this privilege is later revoked, then you can drop the trigger, but not alter it.
The object privileges to the schema objects referenced in the trigger body must be granted to the trigger owner explicitly (not through a role). The statements in the trigger body operate under the privilege domain of the trigger owner, not the privilege domain of the user issuing the triggering statement. This is similar to the privilege model for stored procedures.