Wednesday, March 7, 2012

Restoring from a backup

Fortunately this isn't a real-life issue, though I want an answer before I
encounter one. As part of the price of being allowed to switched to
differential backups, I have to write a complete, detailed,
screenshot-at-very-stage explanation of our backup and store strategy. When
I got to the restore part of the document, I realized that I don't fully
understand this.
I loaded the Restore dialog and saw that it had checked the last full
backup, the last differential, and the last log file, which was created
immediately after the last differential. There were no log files done since
that backup. (I know that you're supposed to backup the tail of the log, but
this was just an exploration of the screen.)
Here's my question:
Doesn't that log file contain all the transactions since the last time the
log was backed up?
Aren't those transactions already in the data that would be recovered from
restoring the full + differential?
What would be the effect of restoring that log on top of the full +
differential?If you haven't backed up the "tail" of the log, then the full+diff+log will
take you only to the pint in time that the last log was backed up.
Restoring only the full+diff takes you to a point in time before the log
backup. You need that log backup to take you beyond the point in time of
the differential.
Let's say that you took 3 log backups after the differential, then you would
have to restore:
full
diff
txn log 1
txn log 2
txn log 3
That would take you up to a point in time at which the 3rd txn log was
taken. If your DB was corrupted after that, then you can do a BACKUP LOG
WITH NO_TRUNCATE to capture the tail of the log and then restore that as
part of the restore process.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Bev Kaufman" <BevKaufman@.discussions.microsoft.com> wrote in message
news:0517FB52-823C-43C2-8EDC-E9E6DDD4CFFD@.microsoft.com...
Fortunately this isn't a real-life issue, though I want an answer before I
encounter one. As part of the price of being allowed to switched to
differential backups, I have to write a complete, detailed,
screenshot-at-very-stage explanation of our backup and store strategy. When
I got to the restore part of the document, I realized that I don't fully
understand this.
I loaded the Restore dialog and saw that it had checked the last full
backup, the last differential, and the last log file, which was created
immediately after the last differential. There were no log files done since
that backup. (I know that you're supposed to backup the tail of the log,
but
this was just an exploration of the screen.)
Here's my question:
Doesn't that log file contain all the transactions since the last time the
log was backed up?
Aren't those transactions already in the data that would be recovered from
restoring the full + differential?
What would be the effect of restoring that log on top of the full +
differential?

No comments:

Post a Comment