Gouache painting of a tall glass cylinder filling with milk beside an empty vermilion pail

Log Space Usage DMV: Check Transaction Log Space in T-SQL

The Log Space Usage DMV, sys.dm_db_log_space_usage, returns one row that shows how big the transaction log is, how full it is, and how much log has built up since the last log backup. This post builds a demo, reads each column, and uses the value to decide when a log backup is worth taking. It also covers open transactions and the simple recovery model.

Read More