Link to home
Start Free TrialLog in
Avatar of YZlat
YZlatFlag for United States of America

asked on

Backup and recovery questions

What exactly happens behind the scenes (I understand that database restore process is started and that's not what I am asking) when you run

RESTORE DATABASE;

statement?

Does it retrieve the last backup whether it was full or incremental backup? Or does it only work for full backups?

Also what happens behind the scenes when you run

RECOVER DATABASE;
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

>>Does it retrieve the last backup whether it was full or incremental backup?

In a nutshell: It does everything it needs to do to restore the database to the present.  It will use whatever resources it needs to perform the restore/recovery.

It may not even need a backup.  It may just need an online archived redo log file.

Depending on how detailed you want to dig, the online docs are probably the best place to start about what each of these commands does.
Avatar of YZlat

ASKER

I have trouble with online documents and learn a lot better if someone explains it to me. If I could just read online docs, I would not post a question, would I?

I understand that it does everyhting it needs to but I was looking for a more fine-grained answer - how does it figure out which backup to use, etc.?
Avatar of YZlat

ASKER

From what I read so far, looks like RESTORE command is not actually doing the resotre, but decided which files are to be used for the restore and verifies their contants. Is this correct?
Avatar of YZlat

ASKER

Another thing I wanted to ask is does BACKUP DATABASE backs up the control files or do you need to do that separately?
>>If I could just read online docs, I would not post a question, would I?

Unfortunately this site isn't really set up to be a training substitute.  It also doesn't lend itself well to very broad questions.   This is a very broad question.

>>how does it figure out which backup to use, etc.?

I believe everything is driven by the SCN.  It checks the current SCN in the control file then does some magic to figure out how far back it needs to go and if it has everything it needs.

I'm sure you are asking about the 'magic' that it does.  Sorry, but I don't know.

>>but decided which files are to be used for the restore and verifies their contants. Is this correct?

Sorry but I honestly don't know.  I've never really jumped into this end of the pool.  It is one of those commands that 'works' so I've never had a reason to ask 'how'.

Hopefully some other Experts will be aslong soon and might be able to help fill in some gaps.
ASKER CERTIFIED SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
restore level 1 incremental did require a extra step but can't remember exactly what
Avatar of YZlat

ASKER

>>What's the difference between reading our comments and reading online docs ?
For me the difference is pretty big and I only need a summary. I am learning too much at this time and I just would not be able to get details on everything and my life would be much more difficult without you guys and your "summaries":)


Another advantage is the ability to ask questions and clarifications:)

Sobasically RESTORE does not do the recovery but copies the files from backup and checks if everything is ready for the recovery? Is that correct?
yes, restore only extracts the datafiles from the backup files