Connection Pool Exhaustion: Reproducing the Timeout and What SQL Server Sees
A PowerShell test that leaks SqlClient connections until the pool times out, what sys.dm_exec_sessions shows, and the fix with proper disposal.
THREADPOOL Waits: Reproducing Worker Thread Exhaustion in SQL Server
Reproducing THREADPOOL waits on SQL Server 2019: how max worker threads is sized, what new logins see, and finding the blocker through the DAC.
Reading the SQL Server Error Log Without sysadmin
SQL Server 2022 added VIEW ANY ERROR LOG. I tested the newer permission against sp_readerrorlog and sp_enumerrorlogs.
Proving the Restore, Part 14: Getting the Script Out of the Procedure
The generator from builds a restore script into a variable. Getting it back out so someone can read it before running it seems like the easy part. PRINT @script returns the beginning of it. How…
Proving the Restore, Part 13: Two Vocabularies for the Same Backup
This series has used two sources for the same information. msdb records what the instance did. RESTORE HEADERONLY reads what’s in the files. They describe the same backups and disagree on almost every name. Code…
Proving the Restore, Part 12: The Files That Take No Extension
The restore script generator from worked on most databases and failed on one. The full backup restored fine everywhere else; on this database the restore refused to start. The database had two FILESTREAM filegroups. The…