Disable ALL Trigger

“Disable ALL Trigger” Article will help you to understand “Disable ALL Triggers of the table” with examples and it’s detailed description.

ALTER TABLE statement used to disable all triggers of the table.

Disable ALL Trigger Example

For better understanding we will create table “sample_users”.

Then create two triggers “trg_test_disable_all_one” and “trg_test_disable_all_two” on sample_users table.

We will check the trigger status from “USER_TRIGGERS” table. This table contains all details about triggers.

Then we will DISABLE triggers by ALTER TABLE statement and then check again the USER_TRIGGERS table and check the status of this triggers.

Code
Output
table SAMPLE_USERS created.
Output
TRIGGER TRG_TEST_DISABLE_ALL_ONE compiled TRIGGER TRG_TEST_DISABLE_ALL_TWO compiled

To learn ENABLE ALL Trigger, Please refer ENABLE ALL TRIGGER

TRIGGER_NAME STATUS
TRG_TEST_DISABLE_ALL_TWO ENABLED
TRG_TEST_DISABLE_ALL_ONE ENABLED
Output
table SAMPLE_USERS altered.

Now again check the status of triggers.

TRIGGER_NAME STATUS
TRG_TEST_DISABLE_ALL_TWO DISABLED
TRG_TEST_DISABLE_ALL_ONE DISABLED
References
  1. Syntax :- Oracle official docs
  2. Disabling ALL triggers :- Oracle official docs
  3. PL/SQL Triggers :- Oracle official docs
It's good to share...Share on FacebookTweet about this on TwitterShare on LinkedInPin on PinterestShare on Google+Email this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *