ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/u01/app

在rman中执行备份恢复,我们从restore database之后一步步探索,我接着执行了如下语句:

RMAN> alter database open;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 04/22/2012 20:28:21
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

当然我们会按照提示接着执行:

RMAN> alter database open resetlogs;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 04/22/2012 20:28:35
ORA-01152: file 1 was not restored from a sufficiently old backup 
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'

伤心的是又会报如上的错误。解决方法:在执行完restore database之后我们要做的是:

RMAN>recover database;

RMAN> alter database open resetlogs;这样就恢复数据库完毕了,当然resetlogs后不要忘记重新做一次数据库备份。

因为restore   还原,是将文件从备份集还原到相应位置,
recover   恢复,将还原的文件同步。

所以仅仅执行restore时会报错数据文件没有完全从旧的备份中进行还原。


以上个人总结如果有误或者不足,希望大家指出



你可能感兴趣的:(oracle)