Enable and Disable all triggers of a schema in Oracle

Enable and Disable all triggers of a schema in Oracle

Before using replication or bulk import, Sometime we need to disable all the trigger of schema for import process.
Following commands will generate script of disable and enable all the triggers present in Schema.

Check the list of triggers present in schema

Select owner,trigger_name from all_triggers where owner='HR';

Disable all triggers of HR Schema

select 'alter trigger '||owner||'.'||trigger_name||' disable ;' from all_triggers where owner = 'HR';

Enable all triggers of HR Schema

select 'alter trigger '||owner||'.'||trigger_name||' enable ;' from all_triggers where owner = 'HR';

Unknown's avatar

Author: SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

One thought on “Enable and Disable all triggers of a schema in Oracle”

Leave a Reply

Discover more from SmartTechWays - Innovative Solutions for Smart Businesses

Subscribe now to keep reading and get access to the full archive.

Continue reading