21 May 2012

Step by Step Enable or Disable the Oracle Triggers

Step by Step Enable or Disable the All Oracle Triggers in Single shot


Example:-

 BEGIN
   FOR i IN (SELECT trigger_name
               FROM all_triggers
              WHERE trigger_name LIKE 'JAI%' AND status = 'DISABLED')
   LOOP
     EXECUTE IMMEDIATE 'ALTER TRIGGER ' || i.trigger_name || ' DISABLE';  
  
     EXECUTE IMMEDIATE 'ALTER TRIGGER ' || i.trigger_name || ' ENABLE';
           
      END LOOP;
END;
/

No comments: