1

When I run the command DBCC LOGINFO, a few of the Status rows contain 2.

Now I want to check why my transaction log cannot be truncated. How do I see this? Does the 2 mean in the Status that they are not reusable or an action is waiting (backup, restore)? Is it saying that it cannot be truncated?

1 Answer 1

5

According the the information in this MSDN forums answer by Sankar Reddy (and other posts when searching for DBCC loginfo status 2):

Status = 2 means that VLF can't be reused (overwritten) at this time and it doesn't necessarily mean that VLF is still active and writing transactions to that VLF. It means that the VLF is waiting for backup/REPL/Mirroring etc...

Database Checkpoints (SQL Server)

CHECKPOINT only truncates the transaction log (marks the VLF for reuse) only in simple recovery model. In Full recovery, you have to take log backup.

Understanding Logging and Recovery in SQL Server by Paul S. Randal

1
  • 1
    @jwalt You'll additionally want to check sys.databases and the log_reuse_wait_desc for why SQL server is saying you can't reuse. Dec 19, 2016 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.