RMAN-06025 - rman keep asking for different logs during recovery

After the restore of rman backup the recover session might return errors similar to below,


This is  a common scenario but still it seems there are difficulties in understanding the reason why rman is asking for more logs. 
So when rman complains on set of missing logs, find the oldest log it is asking and check the first_time/next_time values of particular log from (g)v$archived_log
If the value returned is older than the restored control file time (select checkpoint_time from v$datafile) and between the backup start time, it is required to provide a valid backup of the archive log or in a situation where backup is not available consider opening the database with inconsistencies.

In the scenario shown in above image, the minimum log rman was asking was sequence 777682 of thread 1. For this sequence this was a archive log generated at 11.10 AM 26th July while the controlfile restored was from 11.50 AM 26th July. So we need to provide the correct backup. Depending on the backup methods used, there can be multiple reasons why particular archive log backup is unknown to the restored control file.

In above case, simply the tape backup that contained the backup of sequence 777682 of thread 1 was generated on 27th July. So there is noway restored control file to be aware on that backup. To find out the required backup we need to query the the backup source/ rman catalog for particular log (rman> list backup of archivelog sequence 777682 thread 1;) and restore the backup, catalog the log file and the restart the recovery.

Another scenario is, when checking the time of the archivelog it can be older than the backup start time. Related to above instance, if rman is asking for a log on 24th July where as the backup started time is 26th July, we need to check the consistency of restored datafile. The easiest way is to query the v$datafile_header.
 select file#, name, status, error, recover, checkpoint_change#, checkpoint_time from v$datafile_header order by CHECKPOINT_TIME desc;  
Related to the example, some datafiles were from 24th July while remaining set was from 26th July (Correct restore time). Hence rman is looking for old archivelog backups. Again there can be multiple scenarios why restore was from two different timelines, common culprits being rman skipping in to older backup sets due to unavailability of more recent. Looking at the restore log would always provide clues on the reason.

In above scenario depending on the situation either provide the backups of these old archivelogs or complete the restore from correct backup so the datafiles are consistent (checkpoint_time of datafile header is aligned with checkpoint_time of v$datafile)

Comments

Popular posts from this blog

ORA-16433: The database or pluggable database must be opened in read/write

Wait for unread message on broadcast channel - Blocking Sessions

ORA-14126 - While splitting max value partition