Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have tried to understad how database restore works in SQL Server. I have read from BOL about different phases within the restore operation but did not understand much. Can you please clarify what these different phases do?

share|improve this question
    
If you want to get all the details then read the ARIES paper: cs.berkeley.edu/~brewer/cs262/Aries.pdf –  Remus Rusanu Sep 29 '10 at 21:52

2 Answers 2

up vote 0 down vote accepted

To understand the phases you'll need to have a basic understanding of the recovery models and how they work.

data copy: restore the full and then differential backups you have of the databases.

redo: this rolls forward your logs effectively redoing the database changes that were lost prior to the point of failure. This is optional and won't happen in the simple recovery model.

undo: this looks at the previous restored logs and rolls back any transactions that were added to the logs but not committed to the database.

Those are the basics but obviously if you're not familiar with the recovery models they probably won't make much sense. A better answer could be provided if we had an idea of what you're trying to do.

share|improve this answer

My understanding:

Analysis pass through is done to build a dirty page table and an active transaction table from the last checkpoint. Redo gets locks for oldest open trxn as prep for reapplying changes from the open trxn. Undo rolls back uncommitted trxns.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.