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

Difference between Restore and Recover 1

Status
Not open for further replies.

sgwisby

Technical User
Apr 13, 2005
148
US
What is the difference between Restore and Recover?

Thanks
David
 
Restore: placing all or part of a database back to its state in time when you created the restoring backup files (either by full database backup [i.e., physical backup] or by export [i.e., logical backup]).

Recover: placing the entire database back to its state in time when the latest COMMIT occurred.

Recover can occur automatically if the last shutdown of your database was "ungraceful", either via a power failure or a "shutdown abort". For this type of recovery, your database can be in either NOARCHIVELOG mode or ARCHIVELOG mode since the data that Oracle needs for recovery is available in the on-line redo log files.

If a media failure occurs requiring the restoral of datafiles from the last physical backup of one or more datafiles, then an Oracle recovery can occur only if the database is in ARCHIVELOG mode. In that case, you must issue the "RECOVER DATABASE" command and Oracle applies data from the archive redo log files until the database arrives at either the point in time you specify or [by default] until the most recent COMMIT command.

Did that answer your question?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 

Yes, thank you for the explanation. I am very raw when it comes to Oracle, however, the powers that be have asked me to put together some disaster recovery procedures for the Oracle db. The Oracle database is part of a medical package we purchased and the support doesnot include backing up the databases, although they might assist in some type of restore or recovery incident.
It appears that you are the resident Oracle guru and I sure I speak for many on this forum that you efforts are greatly appreciated.

Thanks
David
 
We need more people in the world like you, who enjoy their work and are willing to assist others.

I always look forward to your insightful input.

Again thanks,
David
 
Santa, is it really as easy to recover from a hot backup as running the RMAN command:

Restore database;

And what would be the complete command for Recovering to a specific point in time if all the arhcive logs are available?

Also, do the redo logs play a role in the restore or recovery process.
All this is really clear as mud to me. :)

Thanks
David
 
Frankly, David, (and possibly embarrasingly) I am not an RMAN aficionado. I do backup and recovery the "Old Fashioned Way"...manually. Well, kind of...I actually have written my own scripts that I have used successfully for years to do what RMAN does, therefore, please forgive my ignorance of RMAN.

If you do not use the RMAN command, "RECOVER DATABASE", to recover your database, guess what the non-RMAN command is to recover your database...it's "RECOVER DATABASE".

Secondly, the command to recover a database to a specific point in time is:
Code:
RECOVER DATABASE UNTIL = 'MM/DD/YYYY HH24:MI';

Thirdly, the redo logs play a role in the RECOVER process, but if you are doing a full database restore, then your must also restore your on-line redo log files since they are one of the three vital groups of files in an Oracle database (i.e., Database Datafiles, On-line Redo Log Files, and Control Files).

If your database failure occurred more recently than your oldest on-line redo log file, then the RECOVER command uses data only from your on-line redo log files. If your failure occurred prior to your earliest on-line redo log file's oldest entry, then RECOVER must use archived redo log files and on-line redo log files (since the most recently COMMITed transaction has not been archived and resides only in your current on-line redo log file.

Does this filter out some of the mud? BTW, your questions are excellent.


[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
Dave

Shouldn't your quoted code be

RECOVER DATABASE UNTIL TIME 'MM/DD/YYYY HH24:MI';

?

Alex
 
So do the redo logs get backed up when you do a full backup of the database?
My cammands I use to get the backup are as follows:

run
{
allocate channel d1 device type disk;
backup database format 'd:\backup\pdb1\%d_%t_%s_%p'
include current controlfile;
sql 'alter system archive log current';
backup archivelog all format 'd:\backup\pdb1\%d_ARC_%t_%s_%p'
delete input;
release channel d1;
}

I am assuming that everything I need to restore and recover from a disaster is included in the backup created from the above commands. If I need to include anything else, can you enlighten me as to what that may be?
Thanks
David
 
Alex, Certainly you are correct. (Sorry, David, my bad.)

David, We'll have to rely upon the syntax confirmations of someone who is more proficient in RMAN. Sorry.

Boy, I'm full of "Sorries" on this post today.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
David,

although I am not an RMAN expert, I am able to confirm that your redo logs get backed up.
It is the command starting with "backup archivelog all".

regards
 
Thanks, hoinz I appreciate your input since I know very little about Oracle. You guys are making me look good in the eyes of the Big Dogs.
I have tried to do a lot of the research myself but sometimes the terminology gets in the way.
These are trying times for me right now as most all my relatives, especially my immediate family have been rendered homeless by the two hurricanes that have struck the Louisiana coast in the last month. These gems of information make my transition to Oracle a lot less stressfull as I struggle through this learning curve.


Again Thanks for making this a lot easier,

Sincerely
David
David
 
David, very sorry to hear of your family's tribulations. Hopefully, things will get better soon. In the meantime, I'm sure the good wishes of the Tek-Tips community go out to you and yours. The very best of luck personally and professionally.
 
Thanks Ken, your heart felt concerns are greatly appreciated.

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top