It's just Emanuele showing you what you can do in the Microsoft Data Platform

There’s a Bug with Extended Events creation in SQL Server Management Studio 18.7: what it is and a workaround


UPDATE 2: The bug was fixed in SSMS 18.8
UPDATE: The bug still isn’t fixed in SSMS 18.7.1

Oh boy, what I found; I haven’t seen anybody else reporting on it, yet, so here I am.
Fortunately, the bug is not breaking, as I’ve found a workaround, but still.


  1. Open the “New Session…” GUI for extended events in SSMS
  2. Give it a name, it’s not important
  3. Add an event with a Duration Field, I’ve added sp_statement_completed and configure it to be higher than an arbitrary value

If you now try to press OK to create the Session, it will error out like this:

Explaination and Workaround

By scripting out the code that the GUI is trying to generate the issue is clear:

For some reason, it’s putting quotes around the date value, hence the query execution fails because the duration field expects an integer value.

The fix is easy, just remove the quotes yourself and execute the scripted query:

I hope it helps, and especially that it gets fixed asap alongside other bugs that are definitely there.

About the author

Emanuele Meazzo

1 comment

It's just Emanuele showing you what you can do in the Microsoft Data Platform

Emanuele Meazzo

My Social Profiles

If you're interested in following me around in the social world, here are some URLs for you

Find Us

123 Main Street
London EC1 4UK

Monday—Friday: 9:00AM–5:00PM
Saturday & Sunday: 11:00AM–3:00PM

About This Site

This may be a good place to introduce yourself and your site or include some credits.