DECLARE
v1 VARCHAR (4000);
CURSOR c1 IS
SELECT tablespace_name FROM DBA_tablespaces WHERE TABLESPACE_NAME LIKE 'CM_%' AND CONTENTS LIKE 'PERMANENT';
BEGIN
FOR rec IN c1
LOOP
SELECT REPLACE(dbms_metadata.get_ddl('TABLESPACE',rec.tablespace_name),'CM_','DCM_') INTO v1 FROM dual ;
--SELECT REPLACE(rec.tablespace_name,'CM_','DCM_') INTO v1 FROM dual ;
Dbms_Output.put_line(v1) ;
END LOOP ;
END ;
Komentarze
Prześlij komentarz