Please Visit Our New Website for Further Communication

Amazon

31 Jan 2013

Disable/Enable Schema Triggers in PL/SQL

Disable Schema Triggers:
BEGIN
FOR x IN (SELECT OBJECT_NAME FROM all_objects where OBJECT_TYPE IN ('TRIGGER') and owner = 'SCOTT')
LOOP
  EXECUTE IMMEDIATE 'ALTER TRIGGER ' || x.OBJECT_NAME || ' DISABLE';
END LOOP;
END;
Enable Schema Triggers:
BEGIN
FOR x IN (SELECT OBJECT_NAME FROM all_objects where OBJECT_TYPE IN ('TRIGGER') and owner = 'SCOTT')
LOOP
  EXECUTE IMMEDIATE 'ALTER TRIGGER ' || x.OBJECT_NAME || ' ENABLE';
END LOOP;
END;

No comments:

Post a Comment