HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Why isn't the transaction log getting truncated when taking a full backup?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
whythefullloggettingtransactionbackupwhenisntruncated

Problem

In full recovery model, if we take a full backup, the log file is not truncated. It is done when we take a transaction log backup.

Any particular reason of why it is done this way?

Solution

Being in the full recovery model means you want the option of restoring to any point in time. That means having a full set of transaction log backups after any database backup.

Imagine you have a db backup from midnight yesterday and log backups from 6, 12 and 18:00. Now you take another db backup. If the log is truncated, you can't restore to 11pm (which would require the previous db backup and all the log backups since).

Context

StackExchange Database Administrators Q#24664, answer score: 6

Revisions (0)

No revisions yet.