Home > Oracle DBA > HOW TO ENABLE OR DISABLE TRIGGERS for a schema.

HOW TO ENABLE OR DISABLE TRIGGERS for a schema.

June 14, 2013

BEGIN
FOR i IN (SELECT trigger_name
FROM DBA_triggers where owner=’SCHEMA NAME’) LOOP

EXECUTE IMMEDIATE ‘ALTER TRIGGER ‘ || i.trigger_name || ‘ DISABLE’;
or

EXECUTE IMMEDIATE ‘ALTER TRIGGER ‘ || i.trigger_name || ‘ ENABLE’;

END LOOP;
END;
/

 

Note:-   There could be a problem with quotes due to formating….Please copy the script to  notepad and replace all quotes with correct quote.

Advertisements
Categories: Oracle DBA
%d bloggers like this: