XE Profiler - Initial Thoughts
- Posted in:
- Microsoft
- SQL Server
- SSMS
- XEvents
SSMS 17.3 was recently released. There's a raft of new items in the release. That includes "XE Profiler", which is what I want to focus on.
When you open SSMS 17.3 and navigate to the Object Explorer window, at the bottom you'll see the new "XE Profiler" node. Expand it and there are two items: "Standard" and "TSQL". Navigate back up the tree to Management, expand it, find "Extended Events", expand it, then expand "Sessions". You should also see two new Extended Events sessions: "QuickSessionStandard" and "QuickSessionTSQL".
Now, go back to the "XE Profiler" node. Right-click "Standard" and select "Launch Session".
A datagrid of event data will open up in the main SSMS window. With time, it will begin filling with data as events occur. Did you notice anything else? Back in the Object Explorer, the QuickSessionStandard Extended Event Session is no longer stopped.
Launching "Standard" from XE Profiler accomplishes the same thing as starting session "QuickSessionStandard" (if it is stopped) and watching live data. Pretty cool shortcut, eh?
Other Observations
Now delete the "QuickSessionStandard" Extended Event. Refresh the Sessions folder/node to verify it's gone. You can also query master.sys.server_event_sessions if you really want to be sure.
It's gone now, right? Go back to XE Profiler, right-click "Standard" and click "Launch Session".
The datagrid appears (as it did before). Switch back to the query window, re-query master.sys.server_event_sessions, and refresh the Sessions node in Object Explorer. The "QuickSessionStandard" session is back!
I don't know if there's a way to add an Extended Event session to the XE Profiler node. I haven't found anything in the documentation.
Final Thoughts
If you're an experienced Extended Events user, I don't think there's anything groundbreaking here for you. At most, XE Profiler saves you a couple clicks. But XE Profiler isn't for us. It's for the old SQL Profiler users that never use Extended Events, as David Shiflet from Microsoft‏ explains.
It's meant to speed up adoption by those who haven't discovered XE yet or who think it takes too long to set up adhoc.
— David Shiflet (@shueybubbles) October 10, 2017
It's a little unfortunate that the new feature has "Profiler" in the name. Most people associate that word with SQL Profiler, which uses trace events. Whereas Extended Events uses, well, extended events. Apples and oranges. "XE Profiler" has nothing to do with the old SQL Profiler and everything to do with Extended Events. I'm guessing the chosen name was a calculated move by Microsoft. Now if Microsoft can just find a way to make everyone use tabs instead of spaces...
Comments