###sample 1   原因是新库起了FRA 区,FRA 区的旧文件属于之前的归档日志文件产生,这样会导致无法识别的问题。

解决办法,清空FRA或者恢复时候不启用FRA.

RMAN RESTORE FAILS WITH RMAN-06023 ALTHOUGH BACKUPS ARE AVAILABLE

After succesfully restoring controlfile from backup or starting database with a backup controlfile RMAN  RESTORE DATABASE command fails with:

RMAN-00571: ====================================================        
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ========        
RMAN-00571: ====================================================        
RMAN-03002: failure of restore command at 11/11/2009 15:09:3            
RMAN-06026: some targets not found - aborting restore                   
....
RMAN-06023: no backup or copy of datafile 3 found to restore            
RMAN-06023: no backup or copy of datafile 2 found to restore            
RMAN-06023: no backup or copy of datafile 1 found to restore   

In the RMAN catalog we can see that there are available database backups.

CHANGES

none

CAUSE

The problem here is that there are some files in the Flash Recovery Area that belong to different incarnation than the available backups CURRENT incarnation.

If we start a RESTORE database with a BACKUP controlfile and Flash Recovery Area is defined, RMAN execute and implicit crosscheck and catalog of all the objects in the Flash Recovery Area.

We can see in the rman script messages like:

Starting restore at 11-11-2009 15:09:27                             
Starting implicit crosscheck backup at 11-11-2009 15:09:27          
Finished implicit crosscheck backup at 11-11-2009 15:09:30          
                                                                    
Starting implicit crosscheck copy at 11-11-2009 15:09:30            
Finished implicit crosscheck copy at 11-11-2009 15:09:30            
                                                                    
searching for all files in the recovery area                        
cataloging files...                                                 
cataloging done                                                     
                                                                    
List of Cataloged Files                                      
=======================                                      
File 1
File 2
... Etc

RMAN will catalog any objects in the Flash Recovery Area that will not be registered in the controlfile and if any of this files belongs to an incarnation different from CURRENT incarnation in the controlfile then changes controlfile CURRENT incarnation to the one found in the file tha is being cataloged.

This prevents database from restoring backups that belong to old CURRENT incarnation.  
RMAN considers backup availble for being restored if the backup incarnation and CURRENT incarnation in controlfile are the same.

We can check that there are not backups belonging to CURRENT incarnation with command:

RMAN> LIST BACKUP RECOVERABLE;

This command only will show CURRENT incarnation available backups

SOLUTION

There are two options to fix the issue:

  1. If the offending cataloged files are few then we can move those files to a directory outside the Flash Recovery Area then we need to restart the whole restore procedure. It's necessary to restore controlfile again
  2. Another solution is to temporarily disable use of the flash recovery area for the duration of the restore and recovery commands.
04-26 15:18
查看更多