Re: RMAN duplicate is asking for wrong backup

  • From: Laimutis.Nedzinskas@xxxxxx
  • To: oracle-l-freelists <oracle-l@xxxxxxxxxxxxx>
  • Date: 29-Jun-2009 08:44:24 ZE2

>I notice that a new incarnation of the
> database was created on April 20 probably when we tested a restore of the
> database.  How do I get rman to use the correct backup?

Plase note that incarnations add a new dimension to the complexity of this
otherwise simple task.
You should know that RMAN can be instructed to use  a particular
incarnation, don't you?

Recently I stumbled on an interesting RMAN feature when appearently a
healthy backup was not used in a very similar situation to yours.
RMAN reported "ora-blabla not backup of datafile #n found" for all
datafiles in the backup set.

The problem was that RMAN auto-crosschecked through everything including
Oracle Flash Receovery Area. It found some incarnations data over there and
*included* it into a control file automatically!!! From that point on the
RMAN was not able to find the backup.

My solution was simply to delete(move) all files from the recovery area,
restore a fresh control file again  and then the restore executed just
fine.
There is a metalink note(more than one, actually) on that issue, see:
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                   Subject: 
                                                                            
                                                                            
                                                                            
              RMAN RESTORE fails with RMAN-06023 or ORA-19505 or RMAN-06100 
              inspite of proper backups                                     
                                                                            
                                                                    Doc ID: 
                                                  457769.1                  
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            






---------------------------------------------------------------------------------

Please consider the environment before printing this e-mail


                                                                           
             dave                                                          
             <david.best@gmail                                             
             .com>                                                      To 
             Sent by:                  JBECKSTROM@xxxxxxxxx                
             oracle-l-bounce@f                                          cc 
             reelists.org              oracle-l-freelists                  
                                       <oracle-l@xxxxxxxxxxxxx>,           
                                       oracle-db-l                         
             2009.06.26 16:14          <oracle-db-l@xxxxxxxxxxxxxxxxxxxx>  
                                                                   Subject 
                                       Re: RMAN duplicate is asking for    
             Please respond to         wrong backup                        
             david.best@gmail.                                             
                    com                                                    
                                                                           
                                                                           
                                                                           
                                                                           




I always restore to the latest SCN.  Login to your catalog via rman and
execute list backup,
take the Ckp SCN add 1 to it and use that in your restore.  ie:

 List of Datafiles in backup set 64482
 File LV Type Ckp SCN    Ckp Time  Name
 ---- -- ---- ---------- --------- ----
 15   1  Incr 5965314506755
26-JUN-09 /u02/oracle/db/apps_st/data/a_txn_ind06.dbf


So I would use:

run {
set until scn 5965314506756;
allocate auxiliary channel ch2 type disk;
duplicate target database to 'TEST';}
}


On Fri, Jun 26, 2009 at 8:40 AM, Jeffrey Beckstrom<JBECKSTROM@xxxxxxxxx>
wrote:
> We are experimenting with RMAN.  Now testing the "duplicate" command.  I
> tried running the duplicate command and it is asking for a backup from
April
> 20 instead of the current backup.  I notice that a new incarnation of the
> database was created on April 20 probably when we tested a restore of the
> database.  How do I get rman to use the correct backup?
>
> RMAN> list incarnation of database;
>
> List of Database Incarnations
> DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
> ------- ------- -------- ---------------- --- ---------- ----------
> 685     701     DBATEST  472074346        PARENT  4377808045 14-JAN-08
> 685     702     DBATEST  472074346        PARENT  4594551687 20-APR-09
> 685     686     DBATEST  472074346        CURRENT 4595318436 24-APR-09
>
> RMAN>
>
>
> Jeffrey Beckstrom
> Database Administrator
> Greater Cleveland Regional Transit Authority
> 1240 W. 6th Street
> Cleveland, Ohio 44113


--
//www.freelists.org/webpage/oracle-l


Other related posts: