April 30, 2015 at 3:56 pm
What is the logic used by the DB recovery/Crash Recovery process while recovering uncommitted data. Does it simply rollback all changes? Say, for example, if a database crashes before transaction (T1) is "hardened" to the
transaction log file. Will the SQL Server engine recovery process roll forward or roll backwards transaction (T1)?
May 1, 2015 at 12:54 am
DicksonMulwa (4/30/2015)
What is the logic used by the DB recovery/Crash Recovery process while recovering uncommitted data. Does it simply rollback all changes? Say, for example, if a database crashes before transaction (T1) is "hardened" to thetransaction log file. Will the SQL Server engine recovery process roll forward or roll backwards transaction (T1)?
Recommend having a look at Books by Kalen Delaney and for a quick answer there are various articles / blogs like this one FOUR PHASE SQL SERVER DATABASE RECOVERY PROCESS[/url]
😎
May 1, 2015 at 4:12 am
Yes, it will roll forward or rollback the transaction depending on if the transaction is complete within the log. If complete, it rolls it forward. If incomplete it rolls it back.
A second recommendation for Kalen's excellent book. Always have a copy of that available.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2015 at 3:46 pm
DicksonMulwa (4/30/2015)
Will the SQL Server engine recovery process roll forward or roll backwards transaction (T1)?
If the COMMIT TRANSACTION for T1 is recorded in the log it will be rolled forward. If no COMMIT for that transaction can be found in the log, it'll be rolled back.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 27, 2015 at 12:31 am
Thanks for this useful information. I have managed to restore my data with the help of this two command: Roll Forward and Rollback
October 31, 2015 at 12:12 am
This was removed by the editor as SPAM
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply