Re: RMAN Question

From: Ram Cheruvattath <ram.cheruvattath_at_gmail.com>
Date: Wed, 12 Aug 2015 08:54:30 -0400
Message-ID: <73FC0F720B08447E8A8EEC0022D02AE4_at_RAMPC>



Since you are trying to restore a database which is from a previous incarnation, I believe you should try using RESTORE instead of DUPLICATE. You can use SET DBID from RMAN to point to the older database. You will then RESTORE controlfile, mount the database, and restore the database using until time.

So I think the script would look something like this...I have not done such a restore in a while...so please test in a safe place

Start your temporary instance in NOMOUNT mode

run {

allocate auxiliary channel t1;

SET DBID <youroldbid>;

set until time = "TO_DATE(' 08/11/2015 01:00:03','MM/DD/YYYY HH24:MI:SS')" ;

RESTORE CONTROLFILE; SQL "ALTER DATABASE MOUNT"; RESTORE DATABASE; RECOVER DATABASE; release channel t1;

}

It may be easier to restore the control file manually rather than in a script . Once the control file is restored, you can use a script to do the rest.

From: Scott Canaan
Sent: Wednesday, August 12, 2015 8:26 AM To: oracle-l_at_freelists.org
Subject: RMAN Question

We are relatively new to using RMAN here. I have a scenario that I just can't figure out how to get around. The background is this:  

  • I refreshed a development database (in noarchivelog mode) from a production database (in archivelog mode)
  • As part of the refresh, an RMAN "register database" was done
  • Later in the day, I got a request to pull 2 tables from the backup of the original development database
  • I tried to "refresh" the development database backup (from prior to the most recent "register database") to another test database

Here are the incarnations of the database I'm trying to get a copy of:  

RMAN> list incarnation of database ADVCDEVL;    

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time

  • ------- -------- ---------------- --- ---------- ----------

311695 311726 ADVCDEVL 2688488336 PARENT 9890186150348 16-SEP-14 311695 311696 ADVCDEVL 2688488336 CURRENT 9891412859057 10-DEC-14 5388186 5388219 ADVCDEVL 2710053647 PARENT 9892407817392 24-MAR-15 5388186 5388187 ADVCDEVL 2710053647 CURRENT 9894043390847 11-AUG-15   RMAN>   Here is the RMAN script that I'm trying to use:  

run {

allocate auxiliary channel notarget1 device type 'sbt_tape' PARMS 'SBT_LIBRARY=/opt/simpana/Base/libobk.so,

ENV=(CvClientName=vmora00a6,CvSrcClientName=advcdevl2,CvInstanceName=Instance001),

BLKSIZE=1048576'; allocate auxiliary channel notarget2 device type 'sbt_tape' PARMS 'SBT_LIBRARY=/opt/simpana/Base/libobk.so,

ENV=(CvClientName=vmora00a6,CvSrcClientName=advcdevl2,CvInstanceName=Instance001),

BLKSIZE=1048576'; set until time = "TO_DATE(' 08/11/2015 01:00:03','MM/DD/YYYY HH24:MI:SS')" ;

duplicate database 'ADVCDEVL' to 'LNXRTEST' noredo;

release channel notarget1;

release channel notarget2;

}  

For the TO_DATE, I've tried both the beginning and the ending times of the backup (this is the beginning time) and I get the same results:

Errors in memory script

RMAN-03015: error occurred in stored script Memory Script

RMAN-06004: ORACLE error from recovery catalog database: RMAN-20208: UNTIL CHANGE is before RESETLOGS change

RMAN-03015: error occurred in stored script Memory Script

RMAN-06004: ORACLE error from recovery catalog database: RMAN-20208: UNTIL CHANGE is before RESETLOGS change

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of Duplicate Db command at 08/12/2015 08:18:45

RMAN-05501: aborting duplication of target database  

RMAN>   I agree that the UNTIL CHANGE is before RESETLOGS change, but that's exactly what I want. How do I get around this?    

Scott Canaan '88 (srcdco_at_rit.edu)

(585) 475-7886 - work                (585) 339-8659 - cell 

"Life is like a sewer, what you get out of it depends on what you put into it." - Tom Lehrer  



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


Emoticon1.gif
Received on Wed Aug 12 2015 - 14:54:30 CEST

Original text of this message