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" (917888)



The information in this article applies to:

  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • 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

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.

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 now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next SQL Server 2005 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

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
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
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
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


Modification Type:MinorLast Reviewed:9/11/2006
Keywords:kbBug kbfix kbtshoot kbHotfixServer kbQFE kbpubtypekc KB917888 kbAudITPRO kbAudDeveloper