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.
Grant Fritchey asked us to talk about our favourite SQL Server tool for T-SQL Tuesday #166. Mine is Extended Events - and I have the GitHub repo and a public speaking session to prove it.
Read a cautionary tale on how I've deceived the SSMS, then promptly forgot about it and, in turn, ultimately confused myself.
This December I'm solving Advent of Code in two languages at once - SQL and KQL. Here's where I'm posting the code and how far I think I'll get.
Create an Extended Events session with just a filename and the .xel file lands somewhere - but where? Here's what the default path is and how to change it.
Fifteen SQL bloggers answered one question: what turns ordinary code into production code? Here's what they taught me.
I picked the T-SQL Tuesday topic and still struggled to answer it. The quality of production code I value most: it has tests.
I'm hosting T-SQL Tuesday this November. The question: which secret ingredient turns ordinary code into production-grade code?