Finding nested references
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.
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.
Read a cautionary tale on how I've deceived the SSMS, then promptly forgot about it and, in turn, ultimately confused myself.
Here are the chronicles of my struggles to add a large Clustered index to a View without causing an outage.
You fix an untrusted constraint, and by morning it's back to untrusted. Here's how to catch the process responsible, using Extended Events.
Open an XE event file in SSMS and the timestamps stare back at you. Local time or server time? I spun up a container in another timezone to find out.
How can 15 be less than 13? A perfect storm of bad assumptions about sql_variant comparison rules.
A colleague needed to find who was changing a specific cell in a busy table. SQL Audit was too noisy, Query Store too vague. I found a way to combine triggers with Extended Events for surgical precision.
I found an IS lock in a deadlock report on an RCSI database. That shouldn't be possible. Here's what caused it.