Home » RDBMS Server » Backup & Recovery » running RMAN commands in RUN file to duplicate a database (10.2.0.4.0, RH Linux 5)
running RMAN commands in RUN file to duplicate a database [message #572763] Mon, 17 December 2012 08:38 Go to next message
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 #572766 is a reply to message #572763] Mon, 17 December 2012 08:42 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Is this supposed to happen?
ask the person who wrote the script why it is included.
Re: running RMAN commands in RUN file to duplicate a database [message #572767 is a reply to message #572763] Mon, 17 December 2012 08:50 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As far as I know nothing is said in the documentation and I never saw someone disabling control file autobackup.

I think you have to raise a SR to Oracle to know if it is expected or a bug.

Regards
Michel
Re: running RMAN commands in RUN file to duplicate a database [message #572770 is a reply to message #572767] Mon, 17 December 2012 08:53 Go to previous messageGo to next message
candi
Messages: 39
Registered: July 2012
Member
ok, thank you.

Black Swan, I wrote the script. I thought the command would run on the TARGET, not the AUXILIARY also.

I will raise an SR.
Re: running RMAN commands in RUN file to duplicate a database [message #572776 is a reply to message #572763] Mon, 17 December 2012 09:59 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>> Is this supposed to happen?
It is, as you asked for it.
>>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?
Looks like you got the terminology wrong and got mixed up.
Oracle documentation
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/glossary.htm#BRADV90099
defines
Quote:
auxiliary database

(1) A database created from target database backups with the RMAN DUPLICATE command.


>> DUPLICATE TARGET DATABASE TO ${DB}
Above line worries me a lot. Hopefully this is not a real 'prod' database.

>> configure controlfile autobackup off;
And as Michel already stated,
There is absolutely no reason to have the above.
Re: running RMAN commands in RUN file to duplicate a database [message #572778 is a reply to message #572776] Mon, 17 December 2012 10:07 Go to previous messageGo to next message
candi
Messages: 39
Registered: July 2012
Member
Mahesh Rajendran wrote on Mon, 17 December 2012 09:59
>> Is this supposed to happen?
It is, as you asked for it.
>>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?
Looks like you got the terminology wrong and got mixed up.


yes, I got the terminology mixed up when writing my question.

Mahesh Rajendran wrote on Mon, 17 December 2012 09:59


Oracle documentation
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/glossary.htm#BRADV90099
defines
Quote:
auxiliary database

(1) A database created from target database backups with the RMAN DUPLICATE command.


Mahesh Rajendran wrote on Mon, 17 December 2012 09:59


>> DUPLICATE TARGET DATABASE TO ${DB}
Above line worries me a lot. Hopefully this is not a real 'prod' database.

Can you elaborate on this comment please. How else do you clone a prod database to test using duplicate?
Mahesh Rajendran wrote on Mon, 17 December 2012 09:59

>> configure controlfile autobackup off;
And as Michel already stated,
There is absolutely no reason to have the above.


There is if you were asked to put it there!
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 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
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

Re: running RMAN commands in RUN file to duplicate a database [message #572913 is a reply to message #572782] Tue, 18 December 2012 10:07 Go to previous message
candi
Messages: 39
Registered: July 2012
Member
Thanks for your help.
Previous Topic: error ORA-19625: error identifying file while rman backup using sap brbackup tool
Next Topic: ORA-01655 on CREATE USER (splitted from RMAN backup error)
Goto Forum:
  


Current Time: Fri Mar 29 07:27:21 CDT 2024