Skip to main content
1 of 2
Rauf Asadov
  • 1.3k
  • 13
  • 35

How crash recovery process works in SQL Server?

H everyone. I would like to ask a question regarding recovery process while restoring database operation. Let's say I restored a full backup with norecovery followed by restoring two t-log backups with norecovery. Lastly I am going to restore the last 3rd t-log backup with recovery keyword.

The question is: when I restore the last t-log backup with recovery keyword, does SQL Server perform redo as well as undo phases or just does undo phase? It seems to me that when we restore backup with norecovery keyword, SQL Server also performs redo phase. The same thing with restoring t-log backups with standby keyword. In this case, SQL Server creates a separate file with the name that contains only "undo" not any "redo".

Rauf Asadov
  • 1.3k
  • 13
  • 35