Name

ALTER TRIGGER

Synopsis

ALTER TRIGGER
[schema.]trigger_name
   [ENABLE | DISABLE]
   [COMPILE [DEBUG] ]

Enables or disables a database trigger (trigger_name).

Keywords

ENABLE

Specifies that this trigger is to be fired when a triggering statement is issued.

DISABLE

Specifies that this trigger is not to be fired when a triggering statement is issued.

COMPILE

Specifies that the trigger is to be manually recompiled after it has become invalid.

DEBUG

Specifies that the PL/SQL compiler is to generate information for use by the PL/SQL debugger.

Notes

You must own this trigger or have the ALTER ANY TRIGGER privilege to issue this command. Unlike other ALTER commands, the ALTER TRIGGER statement does not change the definition or structure of a trigger; this must be done with a CREATE OR REPLACE TRIGGER statement. Note that a trigger is automatically enabled when it is created. The ENABLE and DISABLE clauses of the ALTER TABLE statement may also be used to perform this function.

Example

The following example disables scott’s trigger emp_aud:

ALTER TRIGGER scott.emp_aud ENABLE
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset