PL/SQL supports disabling and enabling triggers in some scenarios.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
You may need to temporarily disable a trigger in the following scenarios:
The database object on which the trigger depends does not exist, which causes the trigger to fail to be compiled.
The execution logic of the trigger does not meet the business requirements.
You want to bypass the trigger to load, modify, or delete a large amount of data.
After the issue is resolved, you can re-enable the disabled trigger.
You can use the ALTER TRIGGER statement with the DISABLE or ENABLE clause to disable or enable a trigger.
The syntax for disabling a trigger is as follows:
ALTER TRIGGER trigger_name DISABLE;
The syntax for enabling a trigger is as follows:
ALTER TRIGGER trigger_name ENABLE;
For more information about how to view the information of a trigger, see View trigger information.
