how to disable trigger in oracle

Here I will explain how to disable trigger on in oracle. Some time we have to disable the trigger on table. Use below query to disable the trigger in oracle database.


Disable all trigger on table

SQL>alter table table_name disable all triggers;


Disable all trigger on schema

We can build script using below sql and execute them on sql prompt.

SQL>spool schema_trigger.sql

SQL>select 'alter trigger ' || table_owner || '.' || trigger_name || ' disable;' from user_triggers;

SQL>@schema_trigger.sql


Disable specific trigger on table

SQL>alter trigger trigger_name disable;


User below query to find the status of trigger

SQL>select status from user_triggers where trigger_name='Trigger_name';

No comments:

Post a Comment

Thanks for reading till end. I hope this will help you more to improve your knowledge.

Now it's your turn!

What do you think? Share your experience in the comments box and subscribe for more interesting post.