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…

Generate Restore Database Commands

Restoring a database backup from one server to another, or from one database to another on the same machine, often requires MOVE … TO … commands. For databases with a lot of files, this can…

Adding a New Transaction Log File when the Existing Log is Full

SQL Server Transaction Log files store details about every change made to a SQL Server Data File. This includes when you need to add a 2nd log file. The act of adding a 2nd log…

Piecemeal Restore: Backup Set Holds a Backup of a Database Other than the Existing Database (Error)

When attempting to do a piecemeal restore of a database, using the ‘REPLACE’ option to replace the existing database, you may see the following error message: Msg 3154, Level 16, State 4, Line 63 The…

Full Recovery without Log Backups? Get Notified!

Why you need log backups in Full Recovery Model Databases in the Full Recovery Model1 log every transaction into the transaction log file. This enables point-in-time recovery2, which can be critical for meeting recovery-point objectives….