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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_21127313/article/details/82184009
备端
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.

猜你喜欢

转载自blog.csdn.net/qq_21127313/article/details/82184009
old