Re: RMAN duplicate is asking for wrong backup
Date: Mon, 29 Jun 2009 07:44:27 +0200
Message-ID: <OF74F70C0C.71365061-ONC22575E4.001DDB6F_at_seb.lt>
>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_at_gmail .com> To Sent by: JBECKSTROM_at_gcrta.org oracle-l-bounce_at_f cc reelists.org oracle-l-freelists <oracle-l_at_freelists.org>, oracle-db-l 2009.06.26 16:14 <oracle-db-l_at_groups.ittoolbox.com> Subject Re: RMAN duplicate is asking for Please respond to wrong backup david.best_at_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_at_gcrta.org>
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
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Jun 29 2009 - 00:44:27 CDT