Fist of all, let me clarify that I'm brand new to this whole DBA world so I apologize in advance.
One of the databases I'm (since a couple of days ago) in charge of is throwing an Error 8623: "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. If you believe you have received this message in error, contact Customer Support Services for more information."
This particular instance is running SQL Server 2014 SP2.
How do I find which query is causing this? I've been having a hard time finding documentation on this.
Thanks!
Best Answer
You can use Extended Events to capture failing queries. Here is a link to a detailed howto article. https://www.brentozar.com/archive/2013/08/what-queries-are-failing-in-my-sql-server/
TSQL to create xevents and start: