Ques :- How to Enabled and Disabled Triggers in oracle 11g?
# Enabling Triggers steps.
You enable a disabled trigger using the ALTER TRIGGER statement with the ENABLE option.
To enable the disabled trigger named trigger01 on the SUJEET table, enter the following statement:
ALTER TRIGGER trigger01 ENABLE;
To enable all triggers defined for a specific table, use the ALTER TABLE statement with the
ENABLE ALL TRIGGERS option. To enable all triggers defined for the SUJEET table,
Enter the following statement:
ALTER TABLE SUJEET ENABLE ALL TRIGGERS;
# Disabling Triggers steps.
Consider temporarily disabling a trigger if one of the following conditions is true:
An object that the trigger references is not available.
You must perform a large data load and want it to proceed quickly without firing triggers.
You are loading data into the table to which the trigger applies.
You disable a trigger using the ALTER TRIGGER statement with the DISABLE option.
To disable the trigger trigger01 on the SUJEET table,
Enter the following statement:
ALTER TRIGGER trigger01 DISABLE;
You can disable all triggers associated with a table at the same time using the ALTER TABLE statement
with the DISABLE ALL TRIGGERS option. For example, to disable all triggers defined for the SUJEET table,
Enter the following statement:
ALTER TABLE SUJEET DISABLE ALL TRIGGERS;
No comments:
Post a Comment