Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cloning a DB on the same server with another name using RMAN DUPLICATE

TomOct 21 2014 — edited Oct 22 2014

DB Version : 11.2.0.3 on Oracle Linux 6.3

I have 3-Node RAC in which I have to duplicate a production DB to a clone DB on the same cluster to reproduce an issue.

I want to clone Production DB FLXWPRD to DUPFLXW. The backup is in tape with Netbackup as the MML. We don't use Catalog schema here.

Target Production DB's diskgroup : DATA_DG1

Auxiliary DB will be using : DATA_DG3

export ORACLE_SID=DUPFLXW1 ## Set the ORACLE_SID of the auxiliary DB

--- Start the Auxiliary in NOMOUNT state

rman CONNECT TARGET sys/admin222@FLXWPRD << EOM

CONNECT AUXILIARY sys/admin222@DUPFLXW;

set echo on

run

{

allocate auxiliary channel t1 type disk;

allocate auxiliary channel a1 type sbt;

allocate auxiliary channel a1 type sbt;

allocate auxiliary channel a2 type sbt;

allocate auxiliary channel a3 type sbt;

send 'NB_ORA_POLICY=FLXWPRD_FULL_WEEKLY,NB_ORA_SERV=CLMDSR198,NB_ORA_CLIENT=mbscprd135';

set until time "to_date('Oct 20 2014 11:31:00','Mon DD YYYY HH24:MI:SS')";

DUPLICATE TARGET DATABASE TO DUPFLXW ;

}

set echo off

exit;

EOM


Question1.

Is there a need to set DBID when running RMAN DUPLICATE ? I don't want my production DB's datafiles to be overwritten by an accidental RMAN restore.

Question2.

Should the password file for the auxiliary DB be created before running the DUPLICATE comman ?

Question3. Why do I need to connect to Target DB (Souce) to run RMAN DUPLICATE ? Any advantage with this ?

    Can I run this DUPLICATE without connecting to Target DB at all like below ?

rman auxiliary / << EOM

set echo on

run

{

allocate auxiliary channel t1 type disk;

allocate auxiliary channel a1 type sbt;

allocate auxiliary channel a1 type sbt;

allocate auxiliary channel a2 type sbt;

allocate auxiliary channel a3 type sbt;

send 'NB_ORA_POLICY=FLXWPRD_FULL_WEEKLY,NB_ORA_SERV=CLMDSR198,NB_ORA_CLIENT=mbscprd135';

set until time "to_date('Oct 20 2014 11:31:00','Mon DD YYYY HH24:MI:SS')";

DUPLICATE TARGET DATABASE TO DUPFLXW ;

}

set echo off

exit;

EOM

Question4.

Any suggestions/tips on these scripts ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 19 2014
Added on Oct 21 2014
2 comments
1,725 views