Enable/disable triggers of a schema - Oracle Database Script. - FOR disabling TRIGGERS OF a SCHEMA SELECT 'ALTER TRIGGER '||OWNER||'.'||TRIGGER_NAME||' DISABLE '||';' FROM dba_triggers WHERE OWNER='&SCHEMA_NAME'; - FOR disableing TRIGGERS FOR a TABLE SELECT 'ALTER TRIGGER '||OWNER||'.'||TRIGGER_NAME||' DISABLE '||';' FROM dba_triggers WHERE TABLE_NAME =('&TABLE_NAME') AND OWNER='&SCHEMA_NAME'; -- Similarly for enabling select 'ALTER TRIGGER '||OWNER||'.'||TRIGGER_NAME||' ENABLE '||';' from dba_triggers where owner='&SCHEMA_NAME'; select 'ALTER TRIGGER '||OWNER||'.'||TRIGGER_NAME||' ENABLE '||';' from dba_triggers where table_name =('&TABLE_NAME') and owner='&SCHEMA_NAME';
- FOR disabling TRIGGERS OF a SCHEMA SELECT 'ALTER TRIGGER '||OWNER||'.'||TRIGGER_NAME||' DISABLE '||';' FROM dba_triggers WHERE OWNER='&SCHEMA_NAME'; - FOR disableing TRIGGERS FOR a TABLE SELECT 'ALTER TRIGGER '||OWNER||'.'||TRIGGER_NAME||' DISABLE '||';' FROM dba_triggers WHERE TABLE_NAME =('&TABLE_NAME') AND OWNER='&SCHEMA_NAME'; -- Similarly for enabling select 'ALTER TRIGGER '||OWNER||'.'||TRIGGER_NAME||' ENABLE '||';' from dba_triggers where owner='&SCHEMA_NAME'; select 'ALTER TRIGGER '||OWNER||'.'||TRIGGER_NAME||' ENABLE '||';' from dba_triggers where table_name =('&TABLE_NAME') and owner='&SCHEMA_NAME';