Tag Archives: enable triggers

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';

Advertisements