2017年(38)
分类: Oracle
2017-12-07 13:48:14
10) Now restore the datafiles to new locations and recover. Since we are recovering the database here till the archivelog sequence 50 the sequence number in the SET UNTIL SEQUENCE clause should be 50 (+1)
RMAN> run
{
set until sequence 51;
set newname for datafile 1 to '/node2/database/prod/sys01.dbf';
set newname for datafile 2 to '/node2/database/prod/undotbs01.dbf';
set newname for datafile 3 to '/node2/database/prod/sysaux01.dbf';
set newname for datafile 4 to '/node2/database/prod/users01.dbf';
set newname for datafile 5 to '/node2/database/prod/1.dbf';
set newname for datafile 6 to '/node2/database/prod/sysaux02.dbf';
set newname for datafile 7 to '/node2/database/prod/undotbs02.dbf';
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}
If we are restoring the Rman backups from tapes,then we should ensure the same media manager variables that were used during backups are maintained during restore too.