ALTER TRIGGER ENABLE

Enables or disables an existing trigger on a table.

SYNTAX

trigger_name Name of the trigger you want to enable or disable.
table_name Name of the table the trigger is associated with.

DESCRIPTION

The ALTER TRIGGER ENABLE command enables or disables an existing trigger on a table. To execute the ALTER TRIGGER ENABLE command on a trigger in a table you must be the table owner, or have DBA or SYSADM security privileges.

A trigger is a database server mechanism that automatically executes predefined commands in response to specific events. This allows a database to perform complex or unconventional operations that might not be possible using standard SQL commands. Since triggers are under the control of the database server, they can ensure data is handled consistently regardless of the source. Once you create a trigger on a table, its operation is transparent to users of the database; DBMaker will fire the trigger every time a user or application program generates a trigger event.

When you create a trigger the trigger is automatically enabled. However, there are times when you may want to temporarily suspend a trigger, such as when you want to test database operations that may cause the trigger to fire. To disable a trigger use the DISABLE keyword. Disabling a trigger does not remove it from the database, and you can enable it again with the ENABLE keyword.

EXAMPLES

The following example disables the trigger named Trig1 on the Employees table.

ALTER TRIGGER Trig1 ON Employees DISABLE

The following example enables the trigger named Trig1 on the Employees table.

ALTER TRIGGER Trig1 ON Employees ENABLE

RELATED COMMANDS

< ALTER TABLESPACE | Contents | ALTER TRIGGER REPLACE >

Copyright 2002 SYSCOM Computer Engineering Co. All rights reserved.