Deploy at Low Priority
Deploy SQL Server schema changes without a maintenance window using a WAIT_AT_LOW_PRIORITY-inspired loop that checks for SCH-S locks and bails out with GOTO.
Long-form notes on TSQL performance, Extended Events, Query Store and the tooling around them. Written from the trenches, not the slide deck.
Deploy SQL Server schema changes without a maintenance window using a WAIT_AT_LOW_PRIORITY-inspired loop that checks for SCH-S locks and bails out with GOTO.
Why SQL Server's fn_xe_file_target_read_file is so frustrating: an nvarchar(max) return type, broken timestamp filtering, and no efficient way to find rollover files.
How I configure SQL Server Management Studio: window layout, the Options settings that matter, essential hotkeys, and small productivity wins for DBAs.
How lock partitioning causes async stats updates to block during online index rebuilds with WAIT_AT_LOW_PRIORITY - full repro and the SQL Server 2022 fix.
SQL Server stores event_file data in the error log folder when no full path is given. Steps to find the current location and change it, on Windows and in Docker.
Creating the clustered index on an Indexed View blocked unrelated queries even under RCSI. The cause was Enterprise view matching, fixable with EXPAND VIEWS.
A CHECK or FOREIGN KEY constraint keeps reverting to untrusted overnight. Here is how to catch the BULK INSERT or bcp process doing it, with Extended Events.
Scalar UDFs silently force your query to run serially, killing parallelism. Even a reference through a view, computed column, or check constraint does it.
How to set up module signing with certificates in SQL Server for cross-database access - without ownership chaining. Complete walkthrough with diagram and follow-along example.
Aaron Bertrand has thrown a gauntlet on Twitter. Instead of commenting on how you do stuff differently, blog about it yourself. Well, challenge accepted!
DMVs and Query Store store the query hash as binary(8), but Extended Events shows a number, and the two refuse to match. Here's how to map between them.
The KEEP PLAN hint is supposed to relax recompilation thresholds, but the docs are vague. I test it against permanent and temp table statistics thresholds.
Combine an AFTER UPDATE trigger with Extended Events to surgically audit only the data changes you care about, cutting through thousands of modifications.
An IS lock appeared in a deadlock report on a database running RCSI - which shouldn't take shared locks. The culprit turned out to be an Indexed View.
Query Store defaults aren't exactly what the docs say. This post finds the real values using Extended Events and explains what Auto capture mode actually means.
Track down SQL Server errors using Extended Events. Capture the full calling stack, parse it with TSQL, and pinpoint exactly where failures happen.
A rant about fn_xe_file_target_read_file - the nvarchar(max) return type, broken time filtering, and the circular dependency for finding rollover files.
Your stored procedure calls another procedure, which calls a view. How deep does it go? Here's a recursive CTE that traces the full dependency chain, including cross-database references.
A crash course on database CI/CD: source control as the source of truth, state-based vs migration-based versioning, and the many moving parts of automated database deployments.
I was paged for a blocking chain where the lead blocker had a transaction name I'd never seen: CSbRollbackHandlerTask::DisableQ. Here is how I reproduced it and why the blocked process report refuses to help.
My SSMS setup guide: layout tweaks, essential Options settings, hotkeys I can't live without, and miscellaneous tips for a better SQL Server Management Studio experience.
An index rebuild quietly blocked an async stats update, and the whole server started timing out. Here is the lock-partitioning repro and the SQL Server 2022 fix.
Does ALTER INDEX REBUILD with WAIT_AT_LOW_PRIORITY log its victims in the error log the same way KILL does? Let's find out.