question

AnujKC avatar image
AnujKC asked

TLog Back Up strategy

I am new to Database Management. I want to know something about transaction log backup in sql server 2008 r2. I took a full backup of my database in the first day. Then took tlog back up in second day. And tlog in third day too. On fourth day I took full back up. And on fifth day i took third tlog back up. So when time recovery came, I recovered full and all tlog back up files skipping second full backup. It worked. But my doubt is that how last tlog backup was able to restore with the second tlog file. Without the second full back up.? How tlog keeps its LSN number ? How it keeps the tlog chain even though its chain had broken at third time?
backup-restoresqlserver 2008r2
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AnujKC avatar image AnujKC commented ·
I also want to know whether tlog chain will be affected, When two users take separate backups of same database.
0 Likes 0 ·
Tim avatar image
Tim answered
Hi AnujKC, if the database remains in FULL recovery or Bulk Logged, every transaction log since the first full could be applied to recovery the database. The LSN stays in sync for every log backup until you break the LSN by certain methods such as truncating the log or switching to simple recovery. It is not advised to rely on having to restore lots of days of transaction logs because if any of the logs are damaged, you can't restore the logs past the damaged one. Typically a good strategy is weekly full backups, daily differential backups and log backups based on your service level agreement for the acceptable recovery point objective. Most organizations I have found this to be 15 minutes (acceptable data loss of up to 15 minutes in this scenario).
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AnujKC avatar image AnujKC commented ·
Thanks @Tim Radney
0 Likes 0 ·
AnujKC avatar image AnujKC commented ·
But Tim does two different users takes tlog backup of same database causes any lsn sync problem ? Two users means let it be admin, and other ordinary user who have permission to backup.
0 Likes 0 ·
Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
It doesn't matter which user takes a transaction log backup as long as those backups are available when it's time to restore. But if user A takes a backup to D:\mybackups and User B takes a backup to E:\mybackups and you don't know about both those locations when you go to restore the database, you may have a broken log chain which will prevent point in time recovery. No one should be taking manual log backups. That's something that should be automated on your system.
0 Likes 0 ·
Wilfred van Dijk avatar image
Wilfred van Dijk answered
It doesn't matter who is running the backup, they only need rights to start a backup. But I suggest to create a job for every backup action
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.