Oracle® Database SQL Language Reference 11g Release 2 (11.2) Part Number E17118-04 |
|
|
PDF · Mobi · ePub |
Triggers are defined using PL/SQL. Therefore, this section provides some general information but refers to Oracle Database PL/SQL Language Reference for details of syntax and semantics.
Use the ALTER
TRIGGER
statement to enable, disable, or compile a database trigger.
Note:
This statement does not change the declaration or definition of an existing trigger. To redeclare or redefine a trigger, use theCREATE
TRIGGER
statement with the OR
REPLACE
keywords.See Also:
CREATE TRIGGER for information on creating a trigger
DROP TRIGGER for information on dropping a trigger
Oracle Database Concepts for general information on triggers
The trigger must be in your own schema or you must have ALTER
ANY
TRIGGER
system privilege.
In addition, to alter a trigger on DATABASE
, you must have the ADMINISTER
DATABASE
TRIGGER
privilege.
(trigger_compile_clause
: See Oracle Database PL/SQL Language Reference for the syntax of this clause.)
Specify the schema containing the trigger. If you omit schema
, then Oracle Database assumes the trigger is in your own schema.
Specify the name of the trigger to be altered.
Specify ENABLE
to enable the trigger. You can also use the ENABLE
ALL
TRIGGERS
clause of ALTER
TABLE
to enable all triggers associated with a table. See ALTER TABLE.
Specify DISABLE
to disable the trigger. You can also use the DISABLE
ALL
TRIGGERS
clause of ALTER
TABLE
to disable all triggers associated with a table.
Specify RENAME
TO
new_name
to rename the trigger. Oracle Database renames the trigger and leaves it in the same state it was in before being renamed.
When you rename a trigger, the database rebuilds the remembered source of the trigger in the USER_SOURCE
, ALL_SOURCE
, and DBA_SOURCE
data dictionary views. As a result, comments and formatting may change in the TEXT
column of those views even though the trigger source did not change.
See Oracle Database PL/SQL Language Reference for the syntax and semantics of this clause and for complete information on creating and compiling triggers.