Re: RMAN RESTORE TO NEW SERVER

From: Andy Rivenes <arivenes_at_llnl.gov>
Date: Fri, 08 Feb 2008 14:55:55 -0800
Message-Id: <7.0.0.16.2.20080208144618.023aeca8@llnl.gov>


Hi Larry, if you're using SET NEWNAME then I don't think placing it in a run block by itself is going to take, even with the SWITCH DATAFILE ALL. This approach has always worked for me:

# . orasetup <SID>
# export NSR_CLIENT=<source host>
# svrmgrl
# SVRMGR> connect internal
# SVRMGR> startup nomount restrict;
# SVRMGR> exit
# rman target sys/<passwd> rcvcat rman_prd/<passwd>@<alias>
# rman> @rman_restore.<SID>
#

run {
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE'
#

set newname for datafile '/u03/oradata/TRGT8/system01.dbf' to '/u05/oradata/COPY8/system01.dbf';
set newname for datafile '/u04/oradata/TRGT8/psidx01.dbf' to '/u06/oradata/COPY8/psidx01.dbf';
...
set newname for datafile '/u02/oradata/TRGT8/sysrbc01.dbf' to '/u08/oradata/COPY8/sysrbc01.dbf';
#

restore ( database );
#

release channel t1;
release channel t2;
}

As you can tell the example is old, which is in my notes for restoring to another machine. Note the svrmgrl command. However, I believe the RMAN syntax is still valid. I think that if you want to switch the datafiles, which in your case seems appropriate, that you would place that command right after the restore. At least that's what I got out of the RMAN reference manual. Good luck.

Andy Rivenes

At 11:20 AM 2/8/2008, Wolfson Larry - lwolfs wrote:

>   I've tried the SET NEWNAME command and when I run it it says it 
> worked but the files always want to go to original place.
>
>
>  RUN
>     {
>SET NEWNAME FOR DATAFILE '/x/system01.dbf'  TO '/y/system01.dbf' ;
>     SWITCH DATAFILE ALL;
>     }
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 08 2008 - 16:55:55 CST

Original text of this message