• Adam Thurgar

Severity 016

I got an alert recently from a Severity 016 error on a production system that I monitor.

The error message was:

"The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query"

It was good to know that setting up the alerts, operators, notifications and database mail all worked.

But it didn't help me find the culprit query. I looked in the plan cache, but couldn't be 100% sure what caused the alert.

I needed more information.

We had already setup a SQL Server Agent job for sp_whoisactive to log to a table, so I modified the alert to run that job the next time the alert fires and hopefully sp_whoisactive can capture the query.

75 views0 comments

Recent Posts

See All

Cardinality estimator

Recently I was asked by a software vendor to review a particular query that ran in under a second on a SQL Server 2014 installation at a compatibility level of 110 (SQL Server 2012), but when run unde

Index fragmentation

A law firm client, occasionally has issues with their legal software, that is provided by the global leader in this field. The response from the software provider is always the same - you have index f

Deleting large amounts of data

I had a client call me about wanting to delete a large amount of data from their database. They knew what tables they wanted to delete from. They also knew that deleting large amounts of data causes t