The control file contains: The database name. The timestamp of database creation. The names of the database's datafiles and online and archived redo log files. The checkpoint, i.e., a record indicating the point in the redo log such that all database changes prior to this point have been saved in the datafiles. Information on backups (when using the Recovery Manager utility).
You should certainly backup the control file after any structural change to the database (i.e. addition of data or log files).
Additionally, as part of a "normal" backup, I would issue - alter system archivelog current; This would cause a log switch, as well as archive the current redo log and all unarchived redo logs. I would then issue - alter system backup controlfile to 'PATH-TO-FILER' reuse; That way I would have a current copy of the control file included in the snapshot. I might also issue - alter system backup controlfile to trace, as well as copy the parameter file (init.ora and config.ora) to the Filer so I have them as part of the snapshot as well. Finally, I would not exclude any tablespaces from the alter tablespace begin backup. I figure if the snapshot is going to capture the datafiles anyway, I might as well have them in hot backup mode so they are valid for backup.
And yes, I would also move the commands that manage the snapshots (except of course the creation of the snapshot) to before the tablespaces are actually put in hot backup mode.
No doubt, the Oracle Backup and Recovery Guide is indispensable. You should fully understand what needs to be backed up and you should test your restore procedures.
-----Original Message----- From: X X [mailto:gynt@post.com] Sent: Tuesday, August 15, 2000 4:57 AM To: toasters@mathworks.com Subject: Re: Snapshots and Oracle
Treat the control files just as you would any other critical DB file. When you shut your DB down and snapshot it, make a backup copy of the control files also. Control files only change when you do structural changes to your database, and thus must be backed up only then. Of course that is best case, just incorporate control files into your normal backups. As for redo logs they do not nee to be backed up. In fact you really cannot use them for anything other than instance recovery when you have the database crash. If you do a clean shutdown there is no data in these redo's. It gets flushed to disk during the shutdown.
Shure! but I was talking about hot-backups. From what I under- stand the control-file also contains info about the logfiles, so it is important when and how it is copied.
Should it not be a "ALTER SYSTEM SWITCH LOGFILE;" (that also updates the control file) and then a "ALTER DATABASE BACKUP CONTROLFILE TO '/SomeDirectory/SomeFileName.bkp' REUSE;" before the snapshot is taken??
Also to minimize the time that the database is in backup mode I would move all the "rsh -l root filer4 snap ..." commands in dohotbackup.sh to a line before the dobegin.sql script is run.
/Gynt
FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup