XEvent in Denali – When an error number isn’t error anymore

I've been going through the XEvents in Denali CTP1 in a fairly rigorous amount of detail, looking for what's changed and specifically for breaking changes. Running all my old event sessions… found one.

One (well OK, quite a few) of my "for illustration" XEvent Sessions have a predicate that looks at the error number for the event sqlserver.error_reported. In SQL Server 2008/R2 XEvents, this predicate would be something like "where error = 999", but Denali the event field for "error" in this event is "replaced" by one for "error_number".

This is a small change but a breaking change, meaning that all event sessions that rely on the event field "error" would break. There are some additional event fields for this event in Denali (so there's probably a good reason for the change), but since I don't think I'm the *only* person with event sessions referencing this event and field, I thought this would be useful information to share. The system_health session uses this event field too, and it (naturally) had to be updated.


Other articles

Imagine feeling confident enough to handle whatever your database throws at you.

With training and consulting from SQLskills, you’ll be able to solve big problems, elevate your team’s capacity, and take control of your data career.