How to use set newname option in rman restore
I was trying to restore rman full backup and it was failed due to one of the required directory is not available in place .
I have total 693 data files and the last data file 693 is trying to restore in /u031 mount point which is not available in my destination server.
Using SET NEWNAME we can change the data file location before restore.
REACTIVE
Case 1:: If you want to restore only single data file after completion of restore and failed for only one data file.
RUN {
set until sequence = 88903;
Send 'NB_ORA_CLIENT=xxxxxx.ffdc.sbc.com';
SET NEWNAME FOR DATAFILE '/u031/oradata/qprd/xxxxxx.dbf' to '/u030/oradata/qprd/xxxxxx.dbf';
RESTORE DATAFILE 693;
SWITCH DATAFILE 693; ( it will update the control file )
RECOVER DATAFILE 693;
}
PROACTIVE
Case 2 : we can use below script, it is the best way to do restore. If you want to move some data files into different location in destination server and restore complete database .
RUN {
set until sequence = 88903;
Send 'NB_ORA_CLIENT=xxxxxx.ffdc.sbc.com';
SET NEWNAME FOR DATAFILE '/u031/oradata/qprd/xxxxxx.dbf' to '/u030/oradata/qprd/xxxxxx.dbf';
RESTORE DATABASE;
SWITCH DATAFILE 693; ( it will update the control file )
RECOVER DATABASE;
}
Comments
Post a Comment