Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: rman restore to a new server question
SuperMega <jagacontest_at_hotmail.com> wrote in
news:1189479431.511561.214860_at_r34g2000hsd.googlegroups.com:
> I have been tasked with cloning our prod db to a new server from an
> rman backup(with a catalog) on tape to a new server in another data
> center. I have installed oracle on the new server and have copied the
> init file and started up the db. I created a new catalog user in the
> new datacenter. I have no experience with rman but have been reading
> up and think I am on the right path. Can anyone confirm?
>
> STARTUP NOMOUNT
>
> rman TARGET / NOCATALOG
>
> RMAN> set DBID 2796110657
>
> {
> allocate channel t1 type "sbt_tape"
> parms="BLKSIZE=524288,SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so.
> 1";
> restore controlfile to '/CCTPROD/oradata/control01.ctl';;
> ALTER DATABASE MOUNT;
> SET newname FOR DATAFILE 9 TO '/NEWPROD/oradata/statsdata1.dbf';
> SET newname FOR DATAFILE ...
> SET newname FOR DATAFILE ...
> SET newname FOR DATAFILE ...(renaming all of the datafiles to the new
> location)
> RESTORE DATABASE;
> RECOVER DATABASE;
> }
>
>
You need to duplicate the database, not restore, or recover. Here is a
sample script I use:
connect target sys/<passwd>@cuprod
connect auxiliary sys/<passwd>@cutest
run {
allocate auxiliary channel d1 type 'SBT_TAPE'; allocate auxiliary channel d2 type 'SBT_TAPE'; send 'NB_ORA_CLIENT=<target_server>, NB_ORA_SERV=<aux_server>';## This is a netbackup command##
set newname for datafile 1 TO '...'; set newname for datafile 2 TO '...'; set newname for datafile 3 TO '...'; set newname for tempfile 1 to '.../TEMP.dbf'; duplicate target database to cutest LOGFILE
I hope this helps. Received on Thu Sep 13 2007 - 20:50:34 CDT