5 pts.
Q:
Database restore
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: Oct 26 2009  2:53 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
49385 pts.
A:
 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0
  • Bookmark and Share
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.)
Last Answered: Oct 27 2009  3:41 AM GMT by Mrdenny   49385 pts.
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _