DECLARE
CURSOR C1 IS select VIEW_NAME,OWNER from dba_views where owner not in ('SYS','SYSTEM','DBSNMP','WMSYS','EXFSYS','CTXSYS','XDB','ORDSYS','ORDDATA','MDSYS','OLAPSYS','SYSMAN','RMAN','APEX_030200');
v_output CLOB :=NULL;
BEGIN
FOR C1_REC in C1 LOOP
select (select * from ( select DBMS_METADATA.GET_DDL('VIEW' , C1_REC.VIEW_NAME, C1_REC.OWNER ) AS "TT" from DUAL) where TT like ('%@YOUR_WORD%') ) INTO v_output from DUAL ;
IF v_output is not null then
DBMS_OUTPUT.PUT_LINE(C1_REC.OWNER ||'.' || C1_REC.VIEW_NAME);
v_output :=NULL;
END IF;
END LOOP;
END;
/
0 yorum:
Yorum Gönder