Processor Error: The query processor could not produce a query plan. ★★★★★★★★★★★★★★★ BalmukundJuly 15, sqlstate 42000 error 8624 20143 0 0 0 Sometimes we see the below error in
Error 8624 Severity 16 State 1SQL Server 2008 R2 SP1 when executing a query in SQL Server Management Studio: ----------------------------------------- Error:
Internal Query Processor Error: The Query Processor Could Not Produce A Query Plan8624, Severity: 16, State: 116. Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services. -----------------------------------------
Internal Query Processor Error Sql 2008 R2So, how to handle this situation? I am using SQL Server 2008 R2 SP1 specifically, because some bugs related to the above problem has been fixed in SQL Server 2005 SP2: http://support.microsoft.com/kb/931329 As I am using SQL Server 2008 R2 SP1, so I should not get this error message, but still I am internal query processor error the query processor encountered an unexpected error during execution getting this. So, maybe I am doing something wrong which is not the above bug but something different. Let’s check. I have used the below query (well, the logic of the query is not important here) in my SSMS: ------------------------------------------ select * from (select c2 "c7", c4 "c8", COUNT(1) "c9" from Table1 group by c2, c4) Table2 where (c7) not in (select c7 from (select c2 "c7", c4 "c8", COUNT(1) "c9" from Table1 group by c2, c4) Table2, (select c7 "c11", COUNT(c7) "c12" from (select c2 "c7", c4 "c8", COUNT(1) "c9" from Table1 group by c2, c4) Table2 group by c7 having count(c7)=1) Table3 where Table2.c7=Table3.c11 and Table2.c9>1) ------------------------------------------ The query failed with: Error: 8624, Severity: 16, State: 116 Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services The error message means that the optimizer couldn’t generate the query plan at all. But why?
MichelDecember 11, 20120 0 0 0 Problem description: We got some mini memory dump. In side our SQL error log, we can see query processor could not produce a query plan because of the hints defined in this query the error message below Stack Signature for the dump is 0x00000000950A8E26 External dump process return code 0x20000001. External dump process returned no errors.Error: 8624, Severity: 16, State: 116. Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services. ex_raise2: Exception raised, major=86, minor=24, state=116, severity=16, attempting to create symptom https://blogs.msdn.microsoft.com/sqlserverfaq/2014/07/15/troubleshooting-error-8624-severity-16-state-21-internal-query-processor-error-the-query-processor-could-not-produce-a-query-plan/ dump ex_raise2: Exception raised, major=86, minor=24, state=116, severity=16 Interesting link:We found out a similar issue. However, I am in SQL Server 2005 SP4 (9.00.5000.00 (X64)), and the issue below was fixed in SQL 2005 SP2.E.G. FIX: Error message when you run a query in Microsoft SQL Server 2005: "Msg 8624, Level 16, State 116 Internal Query Processor Error: The https://blogs.technet.microsoft.com/mdegre/2012/12/11/8624-internal-query-processor-error-the-query-processor-could-not-produce-a-query-plan/ query processor could not produce a query plan" Cause: We got the query from the dump, but you could also get the query with a profiler trace with the events TSQL SQL:BatchCompleted or Stored procedure RPC:Completed with Error and Waring Exception. We the query we are able to reproduce the issue each time. We saw that the dump was generated by statistics stream corrupted (spotted that in the generation script of the objects) Resolution: We run an update statitics with fullscan to solve the issue on all objects called by the query.We run again the query and the issue didn't occur. Michel Degremont | Premier Field Engineer - SQL Server Core Engineer |Tags Dump SQL Server Comments (0) Cancel reply Name * Email * Website Follow UsPopular TagsSQL Server SSAS Cluster Installation Security SQL Server High Availability Windlows Cluster AMO Powershell DBA TIP Analysis Services Kerberos Replication T-SQL Management Studio DC High Availability Migration SSIS Service Packs Archives November 2013(1) September 2013(1) May 2013(1) April 2013(1) March 2013(3) December 2012(1) October 2012(1) September 2012(1) August
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top SQL Server : reasons not to use default database settings for ANSI_NULLS? up vote 3 down vote favorite I've been given a case where a customer is experiencing this error - once in a while: Msg 8624, Level 16, State 21, Line 1 Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services. They're using our software, and running it on SQL Server 2008 R2 (RTM) and at compatibilty level 100 (SQL Server 2008). The database however was originally created on a 2000 or 2005 machine (can't reproduce anymore) and then moved to 2008 R2 recently. The stored procedure in question has an ugly looking INSERT statement which grabs data from ten (yes!) "copies" of a given table, all joined with RIGHT OUTER JOIN against one another (same table - ten JOINs against it). The one solution I found that seems most appropriate has to do with various settings - it's recommended to use: set ANSI_NULLS ON set ANSI_PADDING ON set ANSI_WARNINGS ON set CONCAT_NULL_YIELDS_NULL ON set QUOTED_IDENTIFIER ON set ARITHABORT ON set NUMERIC_ROUNDABORT OFF OK - sure - I can set these before every stored procedure