Rebuild log is the way back from Msg 1813, Could not open new database, when the log file is corrupted. SQL Server expert Jeremy Roe sent me an updated script for newer versions. This post walks through his nine steps in order.
Log Reuse Wait Reason AVAILABILITY_REPLICA: What It Means and How to Fix It
A customer’s database always showed AVAILABILITY_REPLICA as the log reuse wait reason in sys.databases. Here is what it means and three causes to check: a slow network, a long running transaction and a resource constraint.
Huge Transaction Log File in SQL Server: Find the Cause
A huge transaction log file has a named reason in log_reuse_wait_desc. This post builds a small demo database, reads that reason, backs up the log and finds the open transaction that holds it. It ends with a one time shrink and a safe growth step.
How an Open Transaction Uses Free Log Space
An open transaction holds free log space hostage. This post runs one transaction in a SIMPLE recovery database and reads the log after the load and after the commit. It explains why the log grows before COMMIT, what ACTIVE_TRANSACTION means, and why a new FULL recovery database behaves like SIMPLE until its first full backup.







