Where is the magical event log for SQL query failures (on prem)?

Simple as that. Somehow labor transaction baq/dashboard is bombing out on one day (Analyze ok, test returns a tenth of the rows saying there is a SQL error).

Yeah, division by zero, etc. cases which look fine. Just want to know what I’m staring at for this one for the ultimate failure.

for BAQ there is <add uri="profile://ice/fw/DynamicQuery/BaqStatement" /> to dump BAQ SQL statement in the log

If you’re not able to reproduce the error in SSMS, might be time to get familiar with reading cache views.

Enabling Query Store adds heaps of metrics.

Which can scale into a performance and storage nuisance if it’s not constrained, something to consider.

The query store system catalog views (towards the bottom of that first link) can be a gold mine if you have the patience to figure them out. This is where you can start building unattended monitoring and level up to DBA Wizard!

PSA: Where Microsoft has baked in automatic performance improvement recommendations, treat them as hints, not ready solutions. Treating those suggestions as gospel is how database performance ends up choking on compound indexes applied all over the place.

Ok, thank you.

Few things (after I was done being an idiot and figuring out where to place the tag.)

Still interesting how it formats it…still had parameter names.

But hey, at least I was able to copy that query into management studio after adjusting the dates and it came back with…drum roll…a divide by zero. Which I was then able to spot.

Raising teenagers was easier than dealing with coworkers screwing stuff up.

Thanks again,

Kyle