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

Table of Contents

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.

Repro

  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.

comments powered by Disqus

Related Posts

Presenting at SQL Saturday

I’ll be presenting my session on “How to use PowerBi as a Free monitoring tool” this Saturday in Parma.

Read More

You can now script your database objects as a Notebook using SQL Server Management Studio 18.5+

Great News Everyone! Microsoft just dropped SSMS 18.5 after almost 5 long months without any updates; this new release fixes a lot of bugs and introduces a few new features, above them all I’m now showing you the following.

Read More
How to build an Application with modern Technology

How to build an Application with modern Technology

Nemo vel ad consectetur namut rutrum ex, venenatis sollicitudin urna. Aliquam erat volutpat.

Read More