Investigation

8 posts
Finding nested references

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.

Investigation 8 min read Debugging
Misleading SSMS Connection

Misleading SSMS Connection

Read a cautionary tale on how I've deceived the SSMS, then promptly forgot about it and, in turn, ultimately confused myself.

Investigation 3 min read Debugging · Docker
What is causing my constraint to be untrusted?

What is causing my constraint to be untrusted?

You fix an untrusted constraint, and by morning it's back to untrusted. Here's how to catch the process responsible, using Extended Events.

Investigation 7 min read Extended Events · Debugging
Extended Events Timezones

Extended Events Timezones

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.

Investigation 3 min read Extended Events · Docker
Expecting Subvertations

Expecting Subvertations

How can 15 be less than 13? A perfect storm of bad assumptions about sql_variant comparison rules.

Investigation 5 min read Debugging
How to audit data modifications with surgical precision

How to audit data modifications with surgical precision

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.

Investigation 8 min read Extended Events · Debugging
IS Lock in RCSI Enabled Database

IS Lock in RCSI Enabled Database

I found an IS lock in a deadlock report on an RCSI database. That shouldn't be possible. Here's what caused it.

Investigation 6 min read Extended Events · Debugging