Copiare Datafile da ASM ad un altro Diskgroup

Copiare Datafile da ASM ad un altro Diskgroup
  • 12
    Gen

Copiare Datafile da ASM ad un altro Diskgroup

twittergoogle_pluslinkedin

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’;