r/SQL • u/erinstellato • Mar 27 '26
SQL Server Friday Feedback for Extended Events! ⚡
Hey folks! It's been a hot minute since I've posted, a few important things to share, and then a request.
- GitHub Copilot in SSMS is now Generally Available in SSMS 22.4.1.
- We released SSMS 22.4.1 last week and recommend folks update to the latest
- New features include Group by Schema for all SQL databases
- Additional export options including Excel (yes, you read that correctly), JSON, XML and markdown.
- Release notes
Now, many of you know that I like Extended Events (XE) a lot. I've been on a mission for...years...to get folks to use XE instead of Profiler and Trace.
Today's post is *not* about that. 💁♀️
Today, I want to understand what XE or Profiler/Trace sessions you create most often. Bonus points if you share some insight into why you are using those sessions. EXTRA bonus points if you provide the T-SQL.
If you're curious, my reasons are two-fold.
1️⃣ Within SSMS we have XEvent Profiler (don't come at me for the name). We offer two sessions in there to make it easy for folks to get started. Maybe we should add more.
2️⃣ We're working on Agent Mode for GitHub Copilot in SSMS, and using copilot to help analyze XE data would be incredibly helpful. From my side, I want to make sure our initial efforts cover the data you're analyzing most often.
Thanks in advance to any of you that take time to respond here. It's been a great couple of weeks with feedback from SQLCon/FabCon and MVP Summit. Obviously, we're not done 🤗
2
u/rotist Mar 30 '26
I use mainly those (my own):
Failing Queries: https://gist.github.com/Tisit/83b276fa8cc1d52d61fec29d130a0f51
Query Timeouts: https://gist.github.com/Tisit/5be7a0759843a1b8ac39779741590ef5
I think the names should be quite self expanatory. If not the gists itself provide more information ;)
I use profiler if I want to track queries for some login or table or similar. This still feels more natural than fiddling with XE and I feel there is less risk I will leave trace running when I don't need it. Profiler tells you trace is running. Not the case of XE as far as I know.
As for the XEvent Profiler: I took this as opportunity to familarize myself with it and first it simply is not clear what data will be collected. You need to start it and then check the Extended Event definition to see what it is doing. Second you need to start it and only then can you add filters to it. This seems bad. On a busy server who knows what impact will it have before you begin?
1
u/Simple_Brilliant_491 Mar 27 '26
I'd suggest making deadlock analysis easier.
Two points:
(I am doing point 2 in my application, AI SQL Tuner Studio, and sending event_data for recent deadlocks to GPT-5.4. Below shows part of the results I get. The AI analysis is much better than trying to decipher deadlock graphs or sift through the XML manually, in my opinion. My point is the ability for AI to analyze deadlocks and give useful guidance is already proven.)
Sales.OrdersandSales.OrderLinesupdated in opposite order by two proceduresApplication.CountriesandApplication.StateProvincesupdated in opposite order by ad hoc transactions1
u/SonOfZork Mar 27 '26
Most frequent I used is to capture the call stack for rpc complete on procs on AG secondaries to get an idea of what's executing and what parameters may be causing the most issues
-2
u/FastlyFast Mar 27 '26
How about removing copilot and adding a proper file shrinking functionality? Absolute win win.
2
u/[deleted] Mar 28 '26 edited Mar 29 '26
[removed] — view removed comment