Restore RMAN backup
=================
If you are new to RMAN, you should first understand how to backup oracle database using RMAN.
RMAN> SET DBID 12345;
RMAN> STARTUP NOMOUNT; or RMAN> STARTUP FORCE MOUNT;
RMAN> RESTORE CONTROLFILE FROM "/backup/rman/ctl_c-12345-20141003-03";
RMAN> RESTORE CONTROLFILE;
RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE;
RMAN> ALTER DATABASE OPEN RESETLOGS;
Problem
Oracle Database recovery using RMAN fails with RMAN-06054: media recovery requesting unknown archived log
Error Message
archived log file name=/opt/app/oracle/flash_recovery_area/ETAUTOIT/archivelog/2014_04_18/o1_mf_1_20725_9o0qrvh2_.arc thread=1 sequence=20725
channel default: deleting archived log(s)
archived log file name=/opt/app/oracle/flash_recovery_area/ETAUTOIT/archivelog/2014_04_18/o1_mf_1_20725_9o0qrvh2_.arc RECID=20582 STAMP=845172555
unable to find archived log
archived log thread=1 sequence=20726
released channel: c0
released channel: c1
released channel: c2
released channel: c3
released channel: c4
released channel: c5
released channel: c6
released channel: c7
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/18/2014 02:10:32
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 20726 and starting SCN of 3101263306
channel default: deleting archived log(s)
archived log file name=/opt/app/oracle/flash_recovery_area/ETAUTOIT/archivelog/2014_04_18/o1_mf_1_20725_9o0qrvh2_.arc RECID=20582 STAMP=845172555
unable to find archived log
archived log thread=1 sequence=20726
released channel: c0
released channel: c1
released channel: c2
released channel: c3
released channel: c4
released channel: c5
released channel: c6
released channel: c7
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/18/2014 02:10:32
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 20726 and starting SCN of 3101263306
Cause
Oracle does not stop recovery at the last available archive log in the database backupsets as per the restored control file.
Solution
Oracle does not stop recovery at the last available archive log in the database backupsets as per the restored control file. It keeps on requesting for "next available archive log sequence number (20726)". In fact, there is no log sequence 20726 recorded in the restored control file. Hence the database is already consistent after applying log sequence 20725 whose existence was already recorded in the target database control file and that is why the recovery is successful. Now try to open the database with below command and It should complete successfully.
sqlplus '/ as sysdba'
sql>alter database open resetlogs;
Once you execute above command, You should get the "Database altered" message which indicates that the database opened successfully.
sqlplus '/ as sysdba'
sql>alter database open resetlogs;
Once you execute above command, You should get the "Database altered" message which indicates that the database opened successfully.
No comments:
Post a Comment