Extended Events

16 posts
Extended Events and I (T-SQL Tuesday #166)

Extended Events and I (T-SQL Tuesday #166)

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.

T-SQL Tuesday 3 min read Extended Events
Default event_file path for Extended Events

Default event_file path for Extended Events

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.

How to 4 min read Extended Events · Docker
What's in a name? (T-SQL Tuesday #152)

What's in a name? (T-SQL Tuesday #152)

My T-SQL Tuesday rant: an app that connects as '.Net SqlClient Data Provider' turns debugging into a manhunt. Please, name your apps.

T-SQL Tuesday 2 min read Debugging · Extended Events
Scary Scalar Functions - Part Two: Performance

Scary Scalar Functions - Part Two: Performance

A Scalar function that does literally nothing still runs over 20 times slower. Here is the proof, measured four different ways.

Deep Dive 8 min read Performance · Query Store
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
New Extended Events in SQL Server 2022

New Extended Events in SQL Server 2022

SQL Server 2022's CTP has dropped. I diffed its Extended Events against 2019 and pulled out the few new ones worth a look.

Deep Dive 2 min read SQL Server 2022 · Extended Events
Query Hash and Query Plan Hash Mapping

Query Hash and Query Plan Hash Mapping

Ever struggled to match the binary hash from DMVs and Query Store against the numeric one in Extended Events? Let's fix that for good.

How to 9 min read Query Store · Extended Events
KEEP PLAN Demystified

KEEP PLAN Demystified

Ever wondered what the KEEP PLAN hint actually does? The docs are vague, so I tested it against every recompilation threshold to find out.

Deep Dive 16 min read Extended Events · Performance
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
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
Query Store default settings

Query Store default settings

Query Store comes with default settings - but are they what the documentation says? Let's find out using a simple Extended Events session.

Deep Dive 4 min read Query Store · Extended Events
Investigating Errors With Extended Events

Investigating Errors With Extended Events

Production errors are hard to reproduce. Here's my go-to Extended Events session that captures errors with their full TSQL calling stack.

How to 6 min read Extended Events · XML