Drop all Triggers On Database

The Below Scripts Used fro Drop Database Trigger By user or all Database. Please Don’t Use them Until you make sure what you are doing


First One : ( For Specific User)

BEGIN  
 
FOR i in (select trigger_name,owner
             
from dba_triggers
             
where trigger_name like '%_BI%' and owner = 'myTesting' ) LOOP  
   
EXECUTE IMMEDIATE 'DROP TRIGGER '||i.owner||'.'||i.trigger_name;  
 
END LOOP;  END;  

Second One : (For All Database)

BEGIN  
 
FOR i in (select trigger_name,owner
             
from dba_triggers ) LOOP  
   
EXECUTE IMMEDIATE 'DROP TRIGGER '||i.owner||'.'||i.trigger_name;  
 
END LOOP;  END;  

Thank you
Osama Mustafa

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.