FIX: Error message when you use a server-side cursor to run a large complex query in SQL Server 2005: "Error: 8623, Severity: 16, State: 1 The query processor ran out of internal resources"

Article translations Article translations
Article ID: 917888 - View products that this article applies to.
Bug #: 432869 (SQLBUDT)
Bug #: 432872 (SQLBUDT)
Bug #: 648 (SQL Hotfix)
Bug #: 836 (SQL Hotfix)
Bug #: 50000156 (SQL Hotfix)

Notice
Microsoft distributes Microsoft SQL Server 2005 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release.
Expand all | Collapse all

Summary

This article describes the following about this hotfix release:
  • The issues that are fixed by this hotfix package
  • The prerequisites for installing the hotfix package
  • Information about whether you must restart the computer after you install the hotfix package
  • Information about whether you must make any registry changes
  • The files that are contained in the hotfix package

Symptoms

When you use a server-side cursor to run a large complex query in Microsoft SQL Server 2005, you may receive an error message that resembles the following:
Error: 8623, Severity: 16, State: 1 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.
When this problem occurs, an execution plan is not created, and the query does not run.

Resolution

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

No prerequisites are required.

Restart information

You do not have to restart the computer after you apply this hotfix.

Registry information

You do not have to change the registry.

Hotfix file information

This hotfix contains only those files that are required to correct the issues that this article lists. This hotfix may not contain of all the files that you must have to fully update a product to the latest build.

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
32-bit hotfix
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Osql.exe2005.90.1541.051,48818-Apr-200616:06Not Applicable
Replrec.dll2005.90.1541.0781,08818-Apr-200616:05Not Applicable
Sbmsmdlocal.dll9.0.1541.015,599,90418-Apr-200616:07Not Applicable
Sbmsmdredir.dll9.0.1541.03,929,88818-Apr-200616:07Not Applicable
Sqlaccess.dll2005.90.1541.0349,47218-Apr-200616:04Not Applicable
Sqldiag.exe2005.90.1541.0960,28818-Apr-200616:05Not Applicable
Sqlservr.exe2005.90.1541.028,790,10418-Apr-200616:07Not Applicable
64-bit hotfix
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Osql.exe2005.90.1541.083,74418-Apr-200611:01Not Applicable
Replrec.dll2005.90.1541.01,007,39218-Apr-200611:02Not Applicable
Sbmsmdlocal.dll9.0.1541.015,599,90418-Apr-200616:07Not Applicable
Sbmsmdredir.dll9.0.1541.03,929,88818-Apr-200616:07Not Applicable
Sqlaccess.dll2005.90.1541.0356,64018-Apr-200611:02Not Applicable
Sqldiag.exe2005.90.1541.01,127,71218-Apr-200611:02Not Applicable
Sqlservr.exe2005.90.1541.039,500,06418-Apr-200611:03Not Applicable
64-bit hotfix for Itanium processors
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Osql.exe2005.90.1541.0123,16818-Apr-200608:08Not Applicable
Replrec.dll2005.90.1541.02,137,88818-Apr-200608:09Not Applicable
Sbmsmdlocal.dll9.0.1541.048,472,35218-Apr-200608:10Not Applicable
Sbmsmdredir.dll9.0.1541.06,079,26418-Apr-200608:09Not Applicable
Sqlaccess.dll2005.90.1541.0351,52018-Apr-200608:09Not Applicable
Sqldiag.exe2005.90.1541.01,637,15218-Apr-200608:09Not Applicable
Sqlservr.exe2005.90.1541.072,166,68818-Apr-200608:10Not Applicable

Workaround

To work around this problem, simplify the query, or do not use a server-side cursor to run the query.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More information

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 917888 - Last Review: June 20, 2014 - Revision: 4.0
Applies to
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Developer Edition
Keywords: 
kbautohotfix kbbug kbfix kbtshoot kbhotfixserver kbqfe KB917888

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com