ORA-01152: file 1 was not restored from a sufficiently old backup

备端
SQL> ALTER DATABASE OPEN READ ONLY;
ALTER DATABASE OPEN READ ONLY
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oradata/ORCLDG/datafile/system.256.942211925'


SQL> select ts#,checkpoint_change# from v$datafile;

       TS# CHECKPOINT_CHANGE#
---------- ------------------
         0          208128738
         1          208128732
         2          208128732
         4          208128738
         5          208128732
         6          208128732
         8          208128740
         9          208128740
        10          208128740
        11          208128740

10 rows selected.

SQL> select ts#,checkpoint_change# from v$datafile_header;

       TS# CHECKPOINT_CHANGE#
---------- ------------------
         0          208128738
         1          208128732
         2          208128732
         4          208128738
         5          208128732
         6          208128732
         8          208128740
         9          208128740
        10          208128740
        11          208128740

10 rows selected.

SQL> select * from v$recover_file;

no rows selected
从主端备份归档传过来恢复
SQL> 
SQL> recover database until change 208128740 using backup controlfile;
ORA-00283: recovery session canceled due to errors
ORA-01666: control file is for a standby database


SQL> recover standby database until change 208128740 using backup controlfile;
ORA-00279: change 208128732 generated at 08/29/2018 05:22:07 needed for thread
1
ORA-00289: suggestion : /arch/1_154_942212032.dbf
ORA-00280: change 208128732 for thread 1 is in sequence #154


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
^C
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oradata/ORCLDG/datafile/system.256.942211925'



SQL> recover standby database until change 208128740 using backup controlfile;
ORA-00279: change 208128732 generated at 08/29/2018 05:22:07 needed for thread
1
ORA-00289: suggestion : /arch/1_154_942212032.dbf
ORA-00280: change 208128732 for thread 1 is in sequence #154


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/arch/1_154_942212032.dbf
ORA-00279: change 208128732 generated at 08/29/2018 04:09:04 needed for thread
2
ORA-00289: suggestion : /arch/2_143_942212032.dbf
ORA-00280: change 208128732 for thread 2 is in sequence #143


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/arch/2_143_942212032.dbf
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oradata/ORCLDG/datafile/system.256.942211925'


ORA-01112: media recovery not started


SQL> select ts#,checkpoint_change# from v$datafile_header;

       TS# CHECKPOINT_CHANGE#
---------- ------------------
         0          208128740
         1          208128740
         2          208128740
         4          208128740
         5          208128740
         6          208128740
         8          208128740
         9          208128740
        10          208128740
        11          208128740

10 rows selected.

SQL> select ts#,checkpoint_change# from v$datafile;

       TS# CHECKPOINT_CHANGE#
---------- ------------------
         0          208128740
         1          208128740
         2          208128740
         4          208128740
         5          208128740
         6          208128740
         8          208128740
         9          208128740
        10          208128740
        11          208128740

10 rows selected.

SQL> ALTER DATABASE OPEN READ ONLY;

Database altered.

 

我用Rman做了全库备份和归档日志备份,以下是备份: arc_936057575_53_3762.arc 归档 arc_936068367_55_3763.arc arc_936079186_60_3764.arc arc_936089969_62_3765.arc full_DAWH_20170216_1prsmkom_1_1 全库 full_DAWH_20170216_1qrsmkon_1_1 o1_mf_s_936068379_db998vw3_.bkp controlfile和spfile备份 o1_mf_s_936073797_db9gl5pw_.bkp o1_mf_s_936079201_db9mv286_.bkp o1_mf_s_936089985_db9yd1xo_.bkp 这是我今天中午为止这一天内产生的备份。 恢复的时候,先restore,然后recover的时候, 从下面会看出rman在找昨天的3761~3627的归档日志,而今天产生的3762~3765的归档却不应用。 3761~3627这段归档,是昨天的归档, 今天16号的归档只有3762~3765。 那么问题来了,restore了今天的全备,为什么recover的时候会去找做了全备之前的归档呢? 如果是因为controlfile太老了,那不是应该应用正确的归档把controlfile更新吗?怎么不应用正确的归档呢? RMAN> recover database; Starting recover at 16-FEB-17 using channel ORA_DISK_1 starting media recovery Oracle Error: ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/DAWH/oradata/DAWH/system01.dbf' RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 02/16/2017 17:53:20 RMAN-06053: unable to perform media recovery because of missing log RMAN-06025: no backup of archived log for thread 1 with sequence 3761 and starting SCN of 1320314801 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 3760 and starting SCN of 1320288564 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 3759 and starting SCN of 1320259166 found to restore ......................................................... RMAN-06025: no backup of archived log for thread 1 with sequence 3672 and starting SCN of 1315631128 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 3671 and starting SCN of 1315503024 found to restore .................................................. RMAN-06025: no backup of archived log for thread 1 with sequence 3629 and starting SCN of 1312028064 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 3628 and starting SCN of 1311948459 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 3627 and starting SCN of 1311875444 found to restore RMAN-00567: Recovery Manager could not print some error messages
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页