How do you get VLF Count and size in SQL Server? Newer versions add a Dynamic Management Function for it. Here is the query, plus links to my older methods.
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.
SQL SERVER – Msg 3013 – Cannot Create Worker Thread. BACKUP LOG is Terminating Abnormally
Msg 3013, cannot create worker thread, on a log backup. What the worker thread limit really is, and when raising it is the wrong fix.






