Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: rman restore to a new server question

Re: rman restore to a new server question

From: opd28if <dwelch_at_bellsouth.net>
Date: 14 Sep 2007 01:50:34 GMT
Message-ID: <46e9e8ea$0$16548$88260bb3@news.teranews.com>


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

  GROUP 1 (
    '.../log01.dbf','.../log01.dbf') SIZE 10M,   GROUP 2 (
    '.../log02.dbf','.../log02.dbf') SIZE 10M,   GROUP 3 (
    '.../log03.dbf','.../log03.dbf') SIZE 10M;     }

I hope this helps. Received on Thu Sep 13 2007 - 20:50:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US