Disable and enable a trigger

2023-08-18 09:26:34  Updated

You can disable and enable triggers in some PL scenarios.

You may need to temporarily disable a trigger in the following scenarios:

  • The trigger cannot be compiled because a database object that the trigger relies on does not exist.

  • The logic of the trigger does not meet business needs.

  • You want to load, modify, or delete a large amount of data without executing any trigger.

You can enable a disabled trigger as needed.

You can use the ALTER TRIGGER statement in conjunction with a DISABLE or ENABLE clause to enable or disable a trigger.

Disable a trigger by using the following syntax:

ALTER TRIGGER trigger_name DISABLE;

Enable a trigger by using the following syntax:

ALTER TRIGGER trigger_name ENABLE;

Notice

To view the triggers that you defined, you must log on to the sys tenant.

Contact Us