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 ?