用RMAN做异机恢复的时候遇到了错误

[复制链接]
查看11 | 回复5 | 2013-2-25 14:51:24 | 显示全部楼层 |阅读模式
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 09/16/2014 17:06:10
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
RMAN> restore datafile 1;
Starting restore at 16-SEP-14
using channel ORA_DISK_1
skipping datafile 1; already restored to file /u01/app/oracle/oradata/orcl/system01.dbf
restore not done; all files read only, offline, or already restored
Finished restore at 16-SEP-14
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 09/16/2014 17:06:16
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'复制代码恢复用的是
第一步,根据备份的spfile建立相应的目录,adump,bdump,cdump,udump.
第二步,恢复spfile,restore spfile from '/u01/app/rman_backup/controlfileback/cntrl_%s_%p_%s'; 更改$OARCLE_SID目的数据库的sid,然后用恢复的spfile启动数据库到mount状态。
第三步,恢复controlfile, restore controlfile from '/u01/app/rman_backup/controlfileback/cntrl_%s_%p_%s'; 然后建立controfile中对应的数据文件,联机日志文件所对应的目录。
第四步,像controlfile中注册rman信息。catalog start with '/u01/app/‘;
第五步,取回备份数据。 restore database;
第六步,开始恢复 recover database;
第七步,alter database open resetlogs;

回复

使用道具 举报

千问 | 2013-2-25 14:51:24 | 显示全部楼层
其中,第四步,像controlfile中注册rman信息。catalog start with '/u01/app/‘;
没看明白,没有做这一步,会不会跟这个有关系呢
回复

使用道具 举报

千问 | 2013-2-25 14:51:24 | 显示全部楼层
如果你之前的备份的位置和这台机器的位置一样 ,那么可以不做第四步。
如果位置不一样,必须做,不然恢复的时候找不到备份文件位置。
回复

使用道具 举报

千问 | 2013-2-25 14:51:24 | 显示全部楼层
liang545621 发表于 2014-9-16 17:24
如果你之前的备份的位置和这台机器的位置一样 ,那么可以不做第四步。
如果位置不一样,必须做,不然恢复的 ...

明白了,我的备份的文件路径是一模一样的
回复

使用道具 举报

千问 | 2013-2-25 14:51:24 | 显示全部楼层
recover database 成功了吗,有报错吗
回复

使用道具 举报

千问 | 2013-2-25 14:51:24 | 显示全部楼层
本帖最后由 royzs 于 2014-9-17 11:03 编辑
1x1xqq_cu 发表于 2014-9-16 17:43
recover database 成功了吗,有报错吗
我今天又做了一遍recover,报错了
RMAN> restore database;
Starting restore at 17-SEP-14
using channel ORA_DISK_1
skipping datafile 1; already restored to file /u01/app/oracle/oradata/orcl/system01.dbf
skipping datafile 3; already restored to file /u01/app/oracle/oradata/orcl/undotbs01.dbf
skipping datafile 6; already restored to file /u01/app/oracle/oradata/orcl/joffice_data.dbf
skipping datafile 2; already restored to file /u01/app/oracle/oradata/orcl/sysaux01.dbf
skipping datafile 5; already restored to file /u01/app/oracle/oradata/orcl/example01.dbf
skipping datafile 11; already restored to file /u01/app/oracle/oradata/orcl/att_data.dbf
skipping datafile 4; already restored to file /u01/app/oracle/oradata/orcl/users01.dbf
skipping datafile 8; already restored to file /u01/app/oracle/oradata/orcl/PERMISSIONS_data.dbf
skipping datafile 13; already restored to file /u01/app/oracle/oradata/orcl/sales_data.dbf
skipping datafile 7; already restored to file /u01/app/oracle/oradata/rman/rman.dbf
skipping datafile 10; already restored to file /u01/app/oracle/oradata/orcl/zabbix01.dbf
skipping datafile 12; already restored to file /u01/app/oracle/product/11.2.0/db_1/dbs/business.dbf
skipping datafile 9; already restored to file /u01/app/oracle/oradata/orcl/RESUME.dbf
skipping datafile 14; already restored to file /u01/app/oracle/oradata/orcl/cms_data.dbf
restore not done; all files read only, offline, or already restored
Finished restore at 17-SEP-14
RMAN> recover database;
Starting recover at 17-SEP-14
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/17/2014 10:59:11
ORA-19698: /u01/app/oracle/oradata/orcl/redo01.log is from different database: id=1386168307, db_name=ORCL复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行