Deadlock Detection and Analysis

Deadlock detection and analysis in SQL Server is important for the overall health of affected applications. This post shows how to setup an Extended Events session to capture deadlock details. It also provides a stored…

Log File Expansion Automation

SQL Server Database Log file expansion can be fairly tedious if you need to make the log bigger in many reasonably-sized growth increments. It can be tedious because you may need to write and execute…

Detach and Reattach a Database

Overview Occasionally you may want to detach a database while you perform some operation on the SQL Server instance, then re-attach the database after you’ve finished. One such example might be when modifying the SQL…

Find-and-Replace for SQL Server Agent Jobs

Once in a while you might need to make common changes to a lot of SQL Server Agent Jobs. For example, if you change the path where you store SQL Server backup files, you might…

Detect Databases with High VLF Count

Introduction Broadly speaking, the recovery process for SQL Server consists of reading the transaction log, rolling forward committed transactions, and rolling back uncommitted transactions, since the last checkpoint. The SQL Server Transaction Log is segmented…

How to Fix Databases with High VLF Count

In our earlier posts on recovery, we’ve covered the importance of properly managing SQL Server Transaction Log file growth. This includes how to detect databases with a high VLF count. It can be time-consuming to…