SQL Server Extended Event Handling via GUI
In some previous posts, I looked at handling Extended Events by accessing the event stream programatically. One example was a C# console app, the other was a PowerShell script. While I like both options, sometimes you just want a GUI. So I decided to create one. I made the code available on GitHub. There's also a compiled exe available for download.
Getting Started
Here's what you see when you first open the app:
Click File | Connect to SQL : this opens a dialog window that lets you specify the SQL instance you want to connect to. After entering connectivity info, click OK to return to the main form where you'll now see the SQL connectivity info displayed on the tool strip at the bottom of the form.
Click the Session button: this opens a dialog window that shows existing XEvent sessions on the SQL instance. (Sessions that are not started are highlighted.)
Select Session Events: the events selected for capture by the session will be listed in the "Events Handled" section. Select the ones you want to handle (you must pick at least one).
Event Responses: when an event is handled, specify how you want to respond to it. In the "Event Responses" section, there are two options: play a system sound or send email (you must choose at least one option). Pick the system sound desired and/or enter an email address.
Lastly, click the Start button. Here's a video that demonstrates. I'll pick an XEvent session that is configured to capture error_reported and page_split events. I'll deselect the error_reported event--I don't want to respond to that one. For event responses, both "Play a System Sound" and "Send Email" will be configured. I'll click Start, then run some SQL statements to generate some page_split events. Take it away, YouTube...
Bugs and Deficiencies
Software development is hard. You have to think of everything. I'm quite certain I did not. It's inevitable others will find numerous ways to use the software that I never thought of. With that in mind, there's a few shortcomings I'm aware of:
Comments