Chinaunix首页 | 论坛 | 博客
  • 博客访问: 78825
  • 博文数量: 38
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 360
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-11 14:02
文章分类
文章存档

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.
阅读(1922) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~