Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backing up the Control File 1

Status
Not open for further replies.

Rmcta

Technical User
Nov 1, 2002
478
US
I am a bit confused about the existence of the command: ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

I know that above command creates a script that allows us to re-creates the control file.

But..What if I use above command. Then add a couple of tablespaces to my database, etc. Months later I lose my control file.
Would I be able to use my old script to successfully re-create a control file just like the one I lost?

There must be a reason Oracle gives us:
ALTER DATABASE BACKUP CONTROLFILE TO TRACE and ALTER DATABASE BACKUP CONTROLFILE. I am not sure I fully understand when I would use one or the other. [sadeyes]

Thank you


 
Ok, in a nutshell "ALTER DATABASE BACKUP CONTROLFILE TO TRACE" causes the information in the control file (which is a binary file) to be written to an sql type file in the trace directory. You can use this file to create the control file with the CREATE CONTROL FILE command. In addition with some modifications you can clone the database using the trace file.

When you use the command "ALTER DATABASE BACKUP CONTROLFILE to filename, you are basically creating another copy of the controlfile. This is normally used in multiplexing (i.e. creating multiple copies of control file in different directories) in case of loss of directories etc.

Now with regard to backing up your controlfile, this should be really part of your backup/recovery strategy. Depending on what you are doing, you are strongly advised to backup your database at least through hot backup/exp etc on a regular/daily basis (and you should not trust a month old script). The hot backup scripts should contain commands for copying the control file and backing it up to trace. A good DBA should give more emphasis to best practices/priventative medicine rather than "what ifs"! As part of best practices you should ensure that you backup your control files regularly. And if you use an old backup, then I suppose you wll be able to build the database to a certain point in time and then create additional tablespaces and import the relevant data (assuming that you have backed up your data). Personally I would not trust a backup mechanism which does not backup control files on a regular basis.

I hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top