Enable ALL Trigger

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

Sometimes you will found that all triggers of a table are DISABLED and you need to ENABLE ALL again. ALTER TABLE statement used to enable all triggers of the table.

For better understanding we will create table “test_artists”. Then create two triggers “trg_test_enable_all_one” and “trg_test_enable_all_two” on test_artists table.

We will check the trigger status from “USER_TRIGGERS” table. This table contains all details about triggers. Then we will ENABLE triggers by ALTER TABLE statement and then check again the USER_TRIGGERS table and check the status of this triggers.

Examples
Code
Output
table TEST_ARTISTS created.
Output
TRIGGER TRG_TEST_ENABLE_ALL_ONE compiled TRIGGER TRG_TEST_ENABLE_ALL_TWO compiled

When we create triggers, they will be ENABLED by default. To learn DISABLE ALL Trigger, Please refer DISABLE ALL TRIGGER

TRIGGER_NAME STATUS
TRG_TEST_ENABLE_ALL_TWO DISABLED
TRG_TEST_ENABLE_ALL_ONE DISABLED
Output
table TEST_ARTISTS altered.

Now again check the status of triggers.

TRIGGER_NAME STATUS
TRG_TEST_ENABLE_ALL_TWO ENABLED
TRG_TEST_ENABLE_ALL_ONE ENABLED
References
  1. Syntax :- Oracle official docs
  2. Enabling 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 *