Triggers

Question: How can I Disable Triggers Temporarily?

I have tables with update and insert triggers and there are times that I want to work with them for maintenance and not have the triggers fire. Can I do this without dropping and recreating the triggers?

Answer: Disable the triggers.

You can use a SET TRIGGERS trigger_name DISABLED statement. When you finish your work, run a SET TRIGGERS trigger_name ENABLED command. The system will not attempt to go back and run the triggers, but instead will continue as though all triggers had fired correctly during the manipulations. You are responsible to be sure that any referential integrity that may have been enforced by the triggers is handled manually, so be careful in using this.

..................Content has been hidden....................

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