Friday, March 30, 2012

Recovery phases

I have seen this message in Windows event log after restarting database.
3450:
Recovery of database 'IMAX_INV_Mgmt' (5) is 0% complete.
(approximately 2152 more seconds) (Phase 2 of 3)
Question is:
What are these three phases.
Thx,
MohI'm not entirely certain about all 3 but there are at least 2 steps in a
recovery (whether a restore or a DB startup) and they are the
roll-forward and the roll-back. The roll-forward is "redoing" committed
transactions (they may have been written to the transaction log, as this
always happens first, but not yet written to the data file(s)). If the
server is shutdown properly, then this phase will should be very short,
if not non-existent. The roll-back phase is "undoing" transactions that
had not been committed at the recovery point (so at the point the server
was shut down there may have been some transactions in progress that
hadn't been committed yet). These 2 phases will put the data in a
consistent state as at the recovery point.
I'm guessing the 3rd stage in the startup recovery would be bringing the
database "online" so it will accept user connections (in a RESTORE
process the very 1st phase (before roll-forward and then roll-back) is
the data copy phase but this wouldn't be necessary for a startup
recovery because the data would already be in the data files). There's
a fairly good page about it in BOL: Understanding How Restore and
Recovery of Backups Work
<http://msdn2.microsoft.com/en-us/li...8SQL.90%29.aspx>
With SQL 2000 the database is unusable until the end of the roll-back
phase. With SQL 2005 the database is now usable after the end of the
roll-forward phase. From memory they coined this "fast recovery" or
something like that (Database Engine Availability Enhancements
<http://msdn2.microsoft.com/en-us/li...8SQL.90%29.aspx> ).
Hope this helps.
*mike hodgson*
http://sqlnerd.blogspot.com
Moh wrote:

>I have seen this message in Windows event log after restarting database.
>3450:
>Recovery of database 'IMAX_INV_Mgmt' (5) is 0% complete.
>(approximately 2152 more seconds) (Phase 2 of 3)
>Question is:
>What are these three phases.
>Thx,
>Moh
>|||Just a note that in SQL 2005 its only Enterprise edition that allows the dat
abase to be accessed before the rol back phase is complete.
--
Simon Sabin
SQL Server MVP
http://sqljunkies.com/weblog/simons
"Mike Hodgson" <e1minst3r@.gmail.com> wrote in message news:OJ64mwqYGHA.1016@.
TK2MSFTNGP03.phx.gbl...
I'm not entirely certain about all 3 but there are at least 2 steps in a rec
overy (whether a restore or a DB startup) and they are the roll-forward and
the roll-back. The roll-forward is "redoing" committed transactions (they m
ay have been written to the transaction log, as this always happens first, b
ut not yet written to the data file(s)). If the server is shutdown properly
, then this phase will should be very short, if not non-existent. The roll-
back phase is "undoing" transactions that had not been committed at the reco
very point (so at the point the server was shut down there may have been som
e transactions in progress that hadn't been committed yet). These 2 phases
will put the data in a consistent state as at the recovery point.
I'm guessing the 3rd stage in the startup recovery would be bringing the dat
abase "online" so it will accept user connections (in a RESTORE process the
very 1st phase (before roll-forward and then roll-back) is the data copy pha
se but this wouldn't be necessary for a startup recovery because the data wo
uld already be in the data files). There's a fairly good page about it in B
OL: Understanding How Restore and Recovery of Backups Work
With SQL 2000 the database is unusable until the end of the roll-back phase.
With SQL 2005 the database is now usable after the end of the roll-forward
phase. From memory they coined this "fast recovery" or something like that
(Database Engine Availability Enhancements).
Hope this helps.
mike hodgson
http://sqlnerd.blogspot.com
Moh wrote:
I have seen this message in Windows event log after restarting database.
3450:
Recovery of database 'IMAX_INV_Mgmt' (5) is 0% complete.
(approximately 2152 more seconds) (Phase 2 of 3)
Question is:
What are these three phases.
Thx,
Moh

No comments:

Post a Comment