Wednesday, August 22, 2007

Internal Query Processor Error The query processor could not produce a query plan

FIX: Error message when you run a query that fires an INSTEAD OF trigger in SQL Server 2005 Service Pack 2: "Internal Query Processor Error The query processor could not produce a query plan"

SYMPTOMS
Consider the following scenario. In Microsoft SQL Server 2005 Service Pack 2, you run a query that fires an INSTEAD OF trigger. The INSTEAD OF trigger references both the inserted table and the deleted table. The INSTEAD OF trigger updates the base table by using a cursor. In this scenario, you receive the following error message when you run the query:
Msg 8624, Level 16, State 1, Procedure TriggerName, Line LineNumber
Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services.

RESOLUTION
Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next SQL Server 2005 service pack that contains this hotfix.

Get the hotfix here: http://support.microsoft.com/kb/939562/en-US

No comments: