running RMAN commands in RUN file to duplicate a database [message #572763] |
Mon, 17 December 2012 08:38 |
|
candi
Messages: 39 Registered: July 2012
|
Member |
|
|
I have a RUN file within a script to duplicate a database. As part of this RUN file I also run the command configure controlfile autobackup off; as part of this RUN file. However, this command has turned off backup of the control file on the AUXILLARY database (i.e. production) as well as the TARGET database (test). Is this supposed to happen?
My run file is:
rman TARGET sys/XXXX@${DB}-SOURCE AUXILIARY /
RUN {
allocate AUXILIARY channel a1 type disk;
allocate AUXILIARY channel a2 type disk;
allocate AUXILIARY channel a3 type disk;
allocate AUXILIARY channel a4 type disk;
allocate channel t1 type disk;
allocate channel t2 type disk;
allocate channel t3 type disk;
allocate channel t4 type disk;
DUPLICATE TARGET DATABASE TO ${DB}
UNTIL TIME "to_date('$REF_DATE','YYYY-MM-DD:HH24:MI:SS')" NOFILENAMECHECK;
configure controlfile autobackup off;
}
quit;
[Updated on: Mon, 17 December 2012 08:41] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
Re: running RMAN commands in RUN file to duplicate a database [message #572782 is a reply to message #572778] |
Mon, 17 December 2012 10:26 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
TARGET is your prod(ORACLE_SID) database
AUX is where you want to the prod to be duplicated. Call it test(ORACLE_SID).
#
# Warning. Untested script.
#
# I assume you are calling this from the test environment/server
# connect to target. here @prod is your tns entry.
# set ORACLE_SID=test (your aux).
#
rman TARGET sys/XXXX@prod AUXILIARY /
RUN {
allocate AUXILIARY channel a1 type disk;
allocate AUXILIARY channel a2 type disk;
allocate AUXILIARY channel a3 type disk;
allocate AUXILIARY channel a4 type disk;
allocate channel t1 type disk;
allocate channel t2 type disk;
allocate channel t3 type disk;
allocate channel t4 type disk;
DUPLICATE TARGET DATABASE TO test #make you have set your ORACLE_SID=test. Or make appropriate entries.
UNTIL TIME "to_date('$REF_DATE','YYYY-MM-DD:HH24:MI:SS')" NOFILENAMECHECK;
-- any other options.
}
quit;
>> There is if you were asked to put it there!
Upto you.
Just do that when connected to test database. Not when connected to the prod database.
[Updated on: Mon, 17 December 2012 10:31] Report message to a moderator
|
|
|
|