Database restore

5 pts.
Tags:
Database backup and recovery
SQL Server 2005
SQL Server administration
I'm struggling with when is the right time to do my last transactional log backup before my full database backup.

My question is this:

if I do a full db backup once a day at 10pm; and a tran log backup every 4 hours (12pm, 4am, 8am, 12am, 4pm, 8pm).

If i have to restore the db to a point in time, say 11pm. I would use the 12pm backup. But that backup overlaps the time i ran the full db backup. Does this even matter? Or will I have duplicate transactions because the transactions are already in the db and will be applied again when i restore the log file? 



Software/Hardware used:
SQL 2005
ASKED: October 26, 2009  2:53 PM
UPDATED: October 27, 2009  3:41 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

No this doesn’t matter, you won’t get duplicate transactions. You would restore the most recent full, then restore all the transaction log backups which were taken after that full backup until the point it time you wanted to stop restoring.

When the SQL Server does the restore of the full it keeps track of the last LSN which was committed. It then finds that LSN in the log files and begins processing the log file starting with the LSN after that. (It’s actually more complex than that, but that should give you a good idea of what’s happening.)

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following