Copiare datafile da ASM ad un altro diskgroup

SQL> select file_name from dba_data_files where tablespace_name=’TEST’;
FILE_NAME
——————————————————
+DATA/TEST/datafile/test_01.363.837018395
SQL> alter database datafile ‘+DATA/TEST/datafile/test_01.363.837018395’ offline;
RMAN> copy datafile ‘+DATA/TEST/datafile/test_01.363.837018395’ to ‘+DATA_2’;
RMAN>run {
set newname for datafile ‘+DATA/TEST/datafile/test_01.363.837018395’
to ‘+DATA_2/TEST/datafile/test_01.264.837098131’ ;
switch datafile all;
}
SQL> recover datafile ‘+DATA_2/TEST/datafile/test_01.264.837098131’;
SQL> alter database datafile ‘+DATA_2/TEST/datafile/test_01.264.837098131′ online;
SQL> select file_name from dba_data_files where tablespace_name=’TEST’;
FILE_NAME
—————————–
+DATA_2/TEST/datafile/test_01.264.837098131
SQL> alter diskgroup data drop file ‘+DATA/TEST/datafile/test_01.363.837018395’;

Potrebbero interessarti anche...