Home » RDBMS Server » Backup & Recovery » Backup control file (Oracle database 11g)
Backup control file [message #599190] Tue, 22 October 2013 19:53 Go to next message
ZAMM
Messages: 3
Registered: October 2013
Location: australia
Junior Member
Hi,

I want to create binary copy of control file every time I do backup.
I am using sql "alter database backup controlfile to ''+FRADG/TESTDB/controlfile/controlfile.ctl'' "; in my rman backup script.
If I run it second time I got errors as it does does not allow to overwrite existing one.

Thanks
Re: Backup control file [message #599192 is a reply to message #599190] Tue, 22 October 2013 21:08 Go to previous messageGo to next message
Lalit Kumar B
Messages: 1864
Registered: May 2013
Location: World Wide on the Web
Senior Member
REUSE option let's you do that.

ALTER DATABASE BACKUP CONTROLFILE TO '/location/file.bak' REUSE;


The REUSE option allows you to have the new control file overwrite a control file that currently exists.

Read the docs, http://docs.oracle.com/cd/F49540_01/DOC/server.815/a67773/osbackup.htm#5747

Regards,
Lalit

[Updated on: Thu, 06 March 2014 12:57] by Moderator

Report message to a moderator

Re: Backup control file [message #599197 is a reply to message #599192] Tue, 22 October 2013 23:07 Go to previous messageGo to next message
ZAMM
Messages: 3
Registered: October 2013
Location: australia
Junior Member
Thank you Lalit! Also if you can point me if there is any way to use 'format' in this statement
i.e sql "alter database backup controlfile to ''+FRADG/TESTDB/controlfile/current_%d_dbid%I.ctl'' "; This won't work but may something similar .. using % etc..
I can user CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+FRADG/TESTDB/controlfile/controlfile_%F.ctl'; it allows to use %F etc..
But I would like to create a binary copy and not in backup sets...
Sorry if I confused you. I am just learning RMAN
Re: Backup control file [message #599198 is a reply to message #599192] Tue, 22 October 2013 23:32 Go to previous message
ZAMM
Messages: 3
Registered: October 2013
Location: australia
Junior Member
I found it .. I can just use BACKUP AS COPY CURRENT CONTROLFILE FORMAT '+FRADG/TESTDB/controlfile/current_%d_dbid%I.bkp'.

Thanks you again.
Cheers!
Previous Topic: How to recover a database having only the DBF and CTL files, and no other information?
Next Topic: db_recover_file_dest and archive logs
Goto Forum:
  


Current Time: Wed Jul 30 00:49:14 CDT 2014

Total time taken to generate the page: 0.13493 seconds