DB version: 11.2.0.4
Platform : RHEL 6.5
I tried to do the below restore,recover on 10-February-2017 . The source DB was created more than 2 years back. The most recent log sequence at the time of DB backup was 7780.
I used the following command and I was expecting that RMAN will apply all sequences till 7780 . But RMAN applied archive logs only till sequence 7773 and errored out with the below error message (last line in red) . ie RMAN failed to apply 7 archived logs.
run
{
allocate channel ch1 <MML Specific stuff>
.
.
allocatE channel ch7 <MML Specific stuff>
restore database until sequence 7781;
switch datafile all;
recover database until sequence 7781;
}
Error description continued :
All datafiles got restored without errors. But, during the recovery, RMAN is looking for sequence 1, 2 and 3 , which should have been archived 2 years back when the DB was created ! RMAN log (shown below) also shows that it managed to find Sequence 1 and 2 ( 'sequence 1 is already on disk as file <fileName>' ) in the FRA disk.
Archive logs of sequences 1, 2 and 3 should have been archived 2 years back and even the backup of archivelogs would have been deleted 2 years back. Why is RMAN still looking for Sequences 1, 2 and 3 ?
Log of recovery :
<Only the last few lines of datafile restore are shown below for readability reasons>
channel ch4: restoring datafile 00010 to +WMS_DATA/wmsprd/datafile/wms_tables_05.dbf
channel ch4: restoring datafile 00014 to +WMS_DATA/wmsprd/datafile/wms_indexes_05.dbf
channel ch4: reading from backup piece bk_33513_1_935427911
channel ch1: piece handle=bk_33516_1_935427911 tag=HOT_DB_BK
channel ch1: restored backup piece 1
channel ch1: restore complete, elapsed time: 00:05:05
channel ch2: piece handle=bk_33515_1_935427911 tag=HOT_DB_BK
channel ch2: restored backup piece 1
channel ch2: restore complete, elapsed time: 00:05:55
channel ch3: piece handle=bk_33514_1_935427911 tag=HOT_DB_BK
channel ch3: restored backup piece 1
channel ch3: restore complete, elapsed time: 00:05:55
channel ch4: piece handle=bk_33513_1_935427911 tag=HOT_DB_BK
channel ch4: restored backup piece 1
channel ch4: restore complete, elapsed time: 00:06:05
Finished restore at 10-FEB-17 -----------------------------------------------------------------> End of datafile restore
Starting recover at 10-FEB-17
starting media recovery
archived log for thread 1 with sequence 1 is already on disk as file +WMS_FRA/wmsprd/archivelog/2017_02_09/thread_1_seq_1.263.935471865
archived log for thread 1 with sequence 2 is already on disk as file +WMS_FRA/wmsprd/archivelog/2017_02_10/thread_1_seq_2.264.935546913
channel ch1: starting archived log restore to default destination
channel ch1: restoring archived log
archived log thread=1 sequence=7771
channel ch1: reading from backup piece al_33518_1_935428514
channel ch2: starting archived log restore to default destination
channel ch2: restoring archived log
archived log thread=1 sequence=7772
channel ch2: reading from backup piece al_33519_1_935428514
channel ch3: starting archived log restore to default destination
channel ch3: restoring archived log
archived log thread=1 sequence=7773
channel ch3: reading from backup piece al_33523_1_935445630
channel ch1: piece handle=al_33518_1_935428514 tag=TAG20170208T171513
channel ch1: restored backup piece 1
channel ch1: restore complete, elapsed time: 00:00:15
archived log file name=+WMS_FRA/wmsprd/archivelog/2017_02_10/thread_1_seq_7771.266.935547973 thread=1 sequence=7771
channel default: deleting archived log(s)
archived log file name=+WMS_FRA/wmsprd/archivelog/2017_02_10/thread_1_seq_7771.266.935547973 RECID=7779 STAMP=935547974
channel ch2: piece handle=al_33519_1_935428514 tag=TAG20170208T171513
channel ch2: restored backup piece 1
channel ch2: restore complete, elapsed time: 00:00:16
archived log file name=+WMS_FRA/wmsprd/archivelog/2017_02_10/thread_1_seq_7772.267.935547975 thread=1 sequence=7772
channel default: deleting archived log(s)
archived log file name=+WMS_FRA/wmsprd/archivelog/2017_02_10/thread_1_seq_7772.267.935547975 RECID=7780 STAMP=935547975
channel ch3: piece handle=al_33523_1_935445630 tag=TAG20170208T220029
channel ch3: restored backup piece 1
channel ch3: restore complete, elapsed time: 00:00:17
archived log file name=+WMS_FRA/wmsprd/archivelog/2017_02_10/thread_1_seq_7773.268.935547977 thread=1 sequence=7773
archived log file name=+WMS_FRA/wmsprd/archivelog/2017_02_09/thread_1_seq_1.263.935471865 thread=1 sequence=1
channel default: deleting archived log(s)
archived log file name=+WMS_FRA/wmsprd/archivelog/2017_02_10/thread_1_seq_7773.268.935547977 RECID=7781 STAMP=935547979
archived log file name=+WMS_FRA/wmsprd/archivelog/2017_02_10/thread_1_seq_2.264.935546913 thread=1 sequence=2
unable to find archived log
archived log thread=1 sequence=3
released channel: ch1
released channel: ch2
released channel: ch3
released channel: ch4
released channel: ch5
released channel: ch6
released channel: ch7
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/10/2017 02:26:24
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 3 and starting SCN of 8175805389965
Recovery Manager complete.