Systems Engineering and RDBMS

Back to the basics: Disabling/Enabling all triggers on a table

Posted by decipherinfosys on January 22, 2009

In our previous blog posts, we have covered trigger basics here.  We also gave the script to disable and enable the triggers and constraints in Oracle.   There is a very simple way to disable/enable all triggers on a specific table using just one command rather than disabling or enabling individual triggers.

/* To disable all triggers on a table */

SQL> ALTER TABLE TEST DISABLE ALL TRIGGERS;

/* To enable */

SQL> ALTER TABLE TEST ENABLE ALL TRIGGERS;

Above commands will disable/ enable all the triggers on table TEST. Oracle 11g introduced the concept of compound trigger in which you can combine more than one trigger into a single trigger. We had covered it here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: