ALTER TABLE OU_REF.QUOT_BASIS_MAP DROP CONSTRAINT CHECK_ANALYZED;

REVOKE SELECT ANY TABLE ON SCHEMA DW_REF_MAIN FROM OU_REF;
REVOKE INSERT ANY TABLE ON SCHEMA DW_REF_MAIN FROM OU_REF;
REVOKE UPDATE ANY TABLE ON SCHEMA DW_REF_MAIN FROM OU_REF;
REVOKE DELETE ANY TABLE ON SCHEMA DW_REF_MAIN FROM OU_REF;
REVOKE SELECT ANY TABLE ON SCHEMA REFERENCE FROM OU_REF;
REVOKE INSERT ANY TABLE ON SCHEMA REFERENCE FROM OU_REF;
REVOKE UPDATE ANY TABLE ON SCHEMA REFERENCE FROM OU_REF;
REVOKE DELETE ANY TABLE ON SCHEMA REFERENCE FROM OU_REF;


SET SERVEROUTPUT ON;
DECLARE
  v_drop_sql VARCHAR2(32767);
BEGIN
  FOR i IN (
    SELECT  
      'DROP TRIGGER OU_REF.'||TRIGGER_NAME AS sql_str,
      'DW_REF_MAIN.'||TABLE_NAME||'_H' AS trigger_name
    FROM DBA_TRIGGERS 
    WHERE 
        OWNER = 'OU_REF' 
    AND TRIGGER_NAME LIKE '%_H'
  ) LOOP
    v_drop_sql := i.sql_str;
    
  DBMS_OUTPUT.PUT_LINE(i.trigger_name);
  EXECUTE IMMEDIATE v_drop_sql;

--  DBMS_OUTPUT.PUT_LINE(v_drop_sql||'
--/
--  ');

END LOOP;

END;
/






