Sql-server – Ramifications of Deleting Transaction Log Backup

sql servertransaction-log

What are the ramifications of having deleted a backup of the SQL Server transaction log for a database that's in Full Recovery mode?

Caveat: I'm a developer, not a DBA, and we're a "one person" shop.

The saga: We were running out of space on our hard drive, needed to refresh Staging, and didn't have enough room to do so. I took a transaction log backup (which apparently had not been done in a long time, if ever), tried to Shrink the trans log, but that only reduced the size by about 40GB instead of the 175GB it was taking up. I then didn't have enough room for the upcoming nightly backup, so – in my endless wisdom – I deleted the TLOG backup I'd just taken. Restored a copy of Prod to Staging using the 40GB I'd freed up by shrinking the transaction log the first time. The nightly production backups succeeded and all was well. Then this morning I took another backup of the Prod transaction log and tried to shrink it again. This time it worked and free up most of the 135GB that it was taking up.

So… have I potentially ruined the integrity of my Production database? What if in a few days I encounter a disaster and need to do a restore… will the fact that I deleted the first transaction log backup prevent me from doing that?

Best Answer

So order of operation:

  1. 1st tlog backup
  2. delete 1st tlog backup
  3. full backup
  4. tlog backup
  5. no catastrophe, just concerned over integrity

If this is correct then you will be fine. As long as the LSN or chain of (backup) events since the last full backup is not broken you should have no issues with recovery.