RMAN RESTORE FAILS WITH RMAN-06023 BUT THERE ARE BACKUPS AVAILABLE (Doc ID 965122.1)

Applies to:

Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 29-Mar-2012***


Symptoms

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.
To disable Flash Recovery Area you need to undefine db_recovery_file_dest:
2.1. Generate an init.ora file:
       
SQL> create pfile from spfile;


2.2  Edit the init.ora and comment the db_recovery_file_dest entries

#*.db_recovery_file_dest='<directory>'
#*.db_recovery_file_dest_size=<size>

2.3 Bounce database
   
SQL> shutdown;
SQL> startup nomount pfile='.... init.ora'


2.4 Restart the restore controlfile and then restore/recover database commands.
If there are some backuppieces or archivelogs in the Flash Recovery Area that need to be cataloged, then it will be necessary to catalog them manually with:  CATALOG BACKUPPIECE  or CATALOG ARCHIVELOG commands
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值