Hi,
Sometimes You can get ” ORA-00283: recovery session canceled due to errors with ORA-00314 ORA-00312 ” error.
Details of error are as follows.
ORA-00283: recovery session canceled due to errors
ORA-00283: recovery session canceled due to errors ORA-00314: log 2 of thread 1, expected sequence# 2 doesn't match 11 ORA-00312: online log 2 thread 1: '+DATA/MSDB/ONLINELOG/redo02.log'
When I restore and recover database for disaster test, I got this error. Steps of restore and recover database are as follows.
Firstly Restore controlfile as follows.
[oracle@msdbadm01 ~]$ rman target / Recovery Manager: Release 12.1.0.2.0 - Production on Tue Apr 30 11:44:44 2010 Copyright (c) 1982, 2019, Oracle. All rights reserved. connected to target database: MSDB (not mounted) RMAN> restore controlfile from '/u01/control01.ctl'; Starting restore at 28-APR-20 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=155 devtype=DISK channel ORA_DISK_1: copied control file copy output filename=+DATA/MSDB/ONLINELOG/control01.ctl output filename=+DATA/MSDB/ONLINELOG/control02.ctl output filename=+DATA/MSDB/ONLINELOG/control03.ctl Finished restore at 28-APR-20 RMAN> alter database mount; database mounted released channel: ORA_DISK_1
Then restore database.
RMAN> restore database; Starting restore at 28-APR-20 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile backupset restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set restoring datafile 00002 to +DATA/MSDB/ONLINELOG/undotbs01.dbf restoring datafile 00003 to +DATA/MSDB/ONLINELOG/sysaux01.dbf restoring datafile 00004 to +DATA/MSDB/ONLINELOG/users01.dbf channel ORA_DISK_1: reading from backup piece /backup/rman/MSDB/1mlmljvq_1_1 channel ORA_DISK_1: restored backup piece 1 piece handle=/backup/rman/MSDB/1mlmljvq_1_1 tag=TAG20200430T185905 channel ORA_DISK_1: restore complete, elapsed time: 00:00:46 channel ORA_DISK_1: starting datafile backupset restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set restoring datafile 00001 to +DATA/MSDB/ONLINELOG/system01.dbf channel ORA_DISK_1: reading from backup piece /backup/rman/MSDB/1vlmncgc_1_1 channel ORA_DISK_1: restored backup piece 1 piece handle=/backup/rman/MSDB/1vlmncgc_1_1 tag=TAG20200430T110340 channel ORA_DISK_1: restore complete, elapsed time: 00:01:37 Finished restore at 28-APR-20
And start recover database as follows.
RMAN> recover database; Starting recover at 28-APR-20 using channel ORA_DISK_1 starting media recovery archive log thread 1 sequence 2 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_29/o1_mf_1_2_67qdks9h_.arc archive log thread 1 sequence 3 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_29/o1_mf_1_3_67qfn02l_.arc .................................................................... archive log thread 1 sequence 1 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_1_67s4jbd0_.arc archive log thread 1 sequence 2 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_2_67s4jc79_.arc archive log thread 1 sequence 3 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_3_67s4jgmp_.arc archive log thread 1 sequence 4 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_4_67s4jgsl_.arc archive log thread 1 sequence 5 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_5_67s4jmr8_.arc archive log thread 1 sequence 6 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_6_67s4jmvt_.arc archive log thread 1 sequence 7 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_7_67s4jrxw_.arc archive log thread 1 sequence 8 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_8_67s4js5b_.arc archive log thread 1 sequence 9 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_9_67s633xq_.arc archive log thread 1 sequence 10 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_10_67s6340m_.arc archive log thread 1 sequence 11 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_11_67s633qq_.arc archive log thread 1 sequence 1 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_1_67s6698c_.arc archive log thread 1 sequence 2 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_2_67s66btj_.arc archive log thread 1 sequence 3 is already on disk as file +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_3_67s66jb0_.arc archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_29/o1_mf_1_2_67qdks9h_.arc thread=1 sequence=2 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_29/o1_mf_1_3_67qfn02l_.arc thread=1 sequence=3 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_29/o1_mf_1_4_67qfn0cq_.arc thread=1 sequence=4 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_29/o1_mf_1_5_67qfmzj5_.arc thread=1 sequence=5 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_29/o1_mf_1_1_67qgpfo4_.arc thread=1 sequence=1 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_2_67s357q5_.arc thread=1 sequence=2 .......................................... archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_6_67s4jmvt_.arc thread=1 sequence=6 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_7_67s4jrxw_.arc thread=1 sequence=7 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_8_67s4js5b_.arc thread=1 sequence=8 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_9_67s633xq_.arc thread=1 sequence=9 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_10_67s6340m_.arc thread=1 sequence=10 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_11_67s633qq_.arc thread=1 sequence=11 archive log filename=+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_1_67s6698c_.arc thread=1 sequence=1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 29/04/2020 11:53:18 ORA-00283: recovery session canceled due to errors RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '+DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_1_67s6698c_.arc' ORA-00283: recovery session canceled due to errors ORA-00314: log 2 of thread 1, expected sequence# 2 doesn't match 11 ORA-00312: online log 2 thread 1: '+DATA/MSDB/ONLINELOG/redo02.log' RMAN> exit Recovery Manager complete.
I got the errors during recover database, then clear logfile and try to open again.
SQL> alter database clear logfile '+DATA/MSDB/ONLINELOG/redo02.log'; Database altered. SQL> alter database open; alter database open * ERROR at line 1: ORA-01113: file 1 needs media recovery ORA-01110: data file 1: '+DATA/MSDB/ONLINELOG/system01.dbf'
If you got ORA-01110: data file 1: ‘+DATA/MSDB/ONLINELOG/system01.dbf’ errors, then run the recover database until cancel again as follows.
SQL> recover database until cancel; ORA-00279: change 696770 generated at 29/04/2020 11:23:13 needed for thread 1 ORA-00289: suggestion : +DATA/MSDB/ARCHIVELOG/archivelog/2020_04_30/o1_mf_1_2_%u_.arc ORA-00280: change 696770 for thread 1 is in sequence #2 Specify log: {=suggested | filename | AUTO | CANCEL} cancel Media recovery cancelled.
Now Media recovery is done, we can open database in resetlogs mode as follows.
SQL> alter database open resetlogs; Database altered.
Do you want to learn more details about RMAN, then read the following articles.
https://ittutorial.org/rman-backup-restore-and-recovery-tutorials-for-beginners-in-the-oracle-database/