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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Good practices to backup a database... 2

Status
Not open for further replies.

mewa

Technical User
Jul 27, 2001
72
DE
Hi,
I'm looking for some tips on how to backup a database to be able to restore when a total disaster appeares, that is all the controlfiles are lost.
I usually do a full online backup once a day and then I backup archivelogs every 2 hours. I thougt I'm save because I can recover from full and then apply the logs.
But is it possible to apply the archivelogs which are newer then the controlfile (which is from a bakcup taked e.g. 10 hours ago)? Now I'm in doubt...
So how to backup a controlfile to have the less loss possible when all controlfiles are damaged?
Is is possible just to backup a file control1.ctl or should I use a command "backup control file to ..." and then backup created file?

Thanks in advance,
mewa
 

Assuming that your procedure in doing your Hot Backup is correct, and on a daily basis. You are in the right track of backing up your archivelogs periodically (in your case every 2 hours, which is quite frequent I wonder why).

In cases that you need to recover with your backup controlfile. You just restore your applicable archivelogs, and then do a recover from backup controlfile.

Yes, you need to specify a backup controlfile to dir in your hot backup. It is also recommended to do a backup controlfile to trace.
Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
Robbie,
Thanks a lot!
I'm sorry to bother you, but still not everything is clear to me.
I have a full online backup done with clause "alter begin/end backup" and a controlfile taken with "backup controlfile to dir" from a previous night. I also have all the archivelogs produced during the day.
The database crashed - all the datafiles, redos, controlfiles disappear.

I restore all archivelogs. I restore a db from my online backup using a controlfile from a backup.
Can I recover the db up to the time of the last archivelog?
Does it matter I have a controlfile from a backup (the smaller SCN then in archivelogs)? If no, how does the database, having a low SCN in controlfile, know it should apply any archivelogs?
Would it be possible to recover if a controlfile was backed up as a simple file, that is just control1.ctl was put on a tape?
Should I backup a controlfile with my archivelogs frequently during the day?

Or maybe it will be easier to recommend me a good handbook?
Thanks,
mewa

 
Yes you can, using Incomplete recovery (until cancel, your choice). Then open your database with resetlogs option.

No, you can not just backup a control file with an OS command while your database is open. Your backup controlfile to dir and backup controlfile to trace must be called after the hot backup of the tablespaces and a log switch.

This case, your backup is consistent.

Here's a link from technet. You could join this community for free:




Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
The scenario you are outlining requires recovery to be done with a "using backup controlfile" clause. You can forward recover as many archive logs as you have available with the command

RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE;
 
You were very helpful.
Thanks.

mewa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top