Article ID: 930775 - Last Review: October 8, 2011 - Revision: 2.0
FIX: Error message when you try to retrieve rows from a cursor that uses the OPTION (RECOMPILE) query hint in SQL Server 2005: "Could not complete cursor operation because the table schema changed after the cursor was declared"
System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Bug #: 50000695
(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.
After you run the sp_cursoropen stored procedure to create a cursor for a query in SQL Server 2005, you receive the following error message when you try to retrieve rows from the cursor:
Msg 16943, Level 16, State 4, Line 1
Could not complete cursor operation because the table schema changed after the cursor was declared.
This problem occurs when you use the OPTION (RECOMPILE) query hint for the cursor when you run the sp_cursoropen stored procedure.
This hotfix is included in the cumulative hotfix package (build 3152) for SQL Server 2005 Service Pack 2 (SP2). To resolve the problem that is described in this article, install SQL Server 2005 SP2. Then, install the cumulative hotfix package (build 3152) for SQL Server 2005 SP2.
For more information about how to obtain SQL Server 2005 Service Pack 2, click the following article number to view the article in the Microsoft Knowledge Base:
913089
(http://support.microsoft.com/kb/913089/
)
How to obtain the latest service pack for SQL Server 2005
For more information about how to obtain cumulative hotfix package (build 3152) for SQL Server 2005, click the following article number to view the article in the Microsoft Knowledge Base:
933097
(http://support.microsoft.com/kb/933097/
)
Cumulative hotfix package (build 3152) for SQL Server 2005 Service Pack 2 is available
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:
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
You must have Microsoft SQL Server 2005 Service Pack 1 (SP1) installed to apply this hotfix.
Restart information
You do not have to restart the computer after you apply this hotfix.
Hotfix replacement information
This hotfix does not replace any other hotfixes.
Hotfix file information
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.
SQL Server 2005, 32-bit version
Collapse this tableExpand this table
File name
File version
File size
Date
Time
Platform
Databasemailengine.dll
9.0.2214.0
75,120
16-Jan-2007
19:35
x86
Logread.exe
2005.90.2214.0
400,752
16-Jan-2007
19:35
x86
Microsoft.analysisservices.adomdclient.dll
9.0.2214.0
546,160
16-Jan-2007
19:35
x86
Microsoft.analysisservices.deploymentengine.dll
9.0.2214.0
140,656
16-Jan-2007
19:35
x86
Microsoft.analysisservices.dll
9.0.2214.0
1,217,904
16-Jan-2007
19:35
x86
Microsoft.sqlserver.mgdsqldumper.dll
2005.90.2214.0
78,192
16-Jan-2007
19:35
x86
Microsoft.sqlserver.sqlenum.dll
9.0.2214.0
910,704
16-Jan-2007
19:35
x86
Msasxpress.dll
9.0.2214.0
24,944
16-Jan-2007
19:35
x86
Msgprox.dll
2005.90.2214.0
200,560
16-Jan-2007
19:35
x86
Msmdlocal.dll
9.0.2214.0
15,645,552
16-Jan-2007
19:35
x86
Msmdredir.dll
9.0.2214.0
3,993,968
16-Jan-2007
19:35
x86
Mssqlsystemresource.ldf
Not Applicable
524,288
16-Jan-2007
15:03
Not Applicable
Mssqlsystemresource.mdf
Not Applicable
40,108,032
16-Jan-2007
15:03
Not Applicable
Qrdrsvc.exe
2005.90.2214.0
369,520
16-Jan-2007
19:35
x86
Rdistcom.dll
2005.90.2214.0
643,440
16-Jan-2007
19:35
x86
Repldp.dll
2005.90.2214.0
187,248
16-Jan-2007
19:35
x86
Replmerg.exe
2005.90.2214.0
320,880
16-Jan-2007
19:35
x86
Replprov.dll
2005.90.2214.0
550,256
16-Jan-2007
19:35
x86
Replrec.dll
2005.90.2214.0
784,752
16-Jan-2007
19:35
x86
Replsub.dll
2005.90.2214.0
407,408
16-Jan-2007
19:35
x86
spresolv.dll
2005.90.2214.0
177,008
16-Jan-2007
19:36
x86
Sqlaccess.dll
2005.90.2214.0
350,576
16-Jan-2007
19:36
x86
Sqlagent90.exe
2005.90.2214.0
321,392
16-Jan-2007
19:36
x86
Sqlservr.exe
2005.90.2214.0
28,972,968
16-Jan-2007
19:36
x86
Sysdbupg.sql
Not Applicable
218,486
29-Dec-2006
13:53
Not Applicable
Xmlsub.dll
2005.90.2214.0
195,440
16-Jan-2007
19:36
x86
Xpstar90.dll
2005.90.2214.0
295,280
16-Jan-2007
19:36
x86
Xpstar90.rll
2005.90.2214.0
155,504
16-Jan-2007
19:35
x86
SQL Server 2005 hotfix, 64-bit version
Collapse this tableExpand this table
File name
File version
File size
Date
Time
Platform
Databasemailengine.dll
9.0.2214.0
75,120
17-Jan-2007
09:03
x86
Logread.exe
2005.90.2214.0
525,168
17-Jan-2007
09:03
x64
Microsoft.analysisservices.adomdclient.dll
9.0.2214.0
546,160
16-Jan-2007
19:35
x86
Microsoft.analysisservices.adomdclient.dll
9.0.2214.0
546,160
17-Jan-2007
09:03
x86
Microsoft.analysisservices.deploymentengine.dll
9.0.2214.0
140,656
16-Jan-2007
19:35
x86
Microsoft.analysisservices.dll
9.0.2214.0
1,217,904
16-Jan-2007
19:35
x86
Microsoft.sqlserver.mgdsqldumper.dll
2005.90.2214.0
78,192
16-Jan-2007
19:35
x86
Microsoft.sqlserver.mgdsqldumper.dll
2005.90.2214.0
94,064
17-Jan-2007
09:03
x64
Microsoft.sqlserver.sqlenum.dll
9.0.2214.0
877,936
17-Jan-2007
09:03
x86
Msasxpress.dll
9.0.2214.0
24,944
16-Jan-2007
19:35
x86
Msasxpress.dll
9.0.2214.0
30,064
17-Jan-2007
09:03
x64
Msgprox.dll
2005.90.2214.0
262,000
17-Jan-2007
09:03
x64
Msmdlocal.dll
9.0.2214.0
15,645,552
16-Jan-2007
19:35
x86
Msmdredir.dll
9.0.2214.0
3,993,968
16-Jan-2007
19:35
x86
Mssqlsystemresource.ldf
Not Applicable
524,288
16-Jan-2007
15:03
Not Applicable
Mssqlsystemresource.mdf
Not Applicable
40,108,032
16-Jan-2007
15:03
Not Applicable
Qrdrsvc.exe
2005.90.2214.0
434,032
17-Jan-2007
09:03
x64
Rdistcom.dll
2005.90.2214.0
836,464
17-Jan-2007
09:03
x64
Repldp.dll
2005.90.2214.0
187,248
16-Jan-2007
19:35
x86
Repldp.dll
2005.90.2214.0
237,936
17-Jan-2007
09:03
x64
Replmerg.exe
2005.90.2214.0
417,648
17-Jan-2007
09:03
x64
Replprov.dll
2005.90.2214.0
747,888
17-Jan-2007
09:03
x64
Replrec.dll
2005.90.2214.0
1,011,056
17-Jan-2007
09:03
x64
Replsub.dll
2005.90.2214.0
528,240
17-Jan-2007
09:03
x64
Spresolv.dll
2005.90.2214.0
225,648
17-Jan-2007
09:03
x64
Sqlaccess.dll
2005.90.2214.0
357,744
17-Jan-2007
09:03
x86
Sqlagent90.exe
2005.90.2214.0
392,560
17-Jan-2007
09:03
x64
Sqlservr.exe
2005.90.2214.0
39,386,992
17-Jan-2007
09:03
x64
Sysdbupg.sql
Not Applicable
218,486
29-Dec-2006
13:53
Not Applicable
Xmlsub.dll
2005.90.2214.0
319,856
17-Jan-2007
09:03
x64
Xpstar90.dll
2005.90.2214.0
543,600
17-Jan-2007
09:03
x64
Xpstar90.rll
2005.90.2214.0
156,016
17-Jan-2007
09:03
x64
SQL Server 2005 hotfix, 64-bit version for Itanium processors
For more information about the naming schema for Microsoft SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
822499
(http://support.microsoft.com/kb/822499/
)
New naming schema for Microsoft SQL Server software update packages
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684
(http://support.microsoft.com/kb/824684/
)
Description of the standard terminology that is used to describe Microsoft software updates
This hotfix is also included in the cumulative update package (build 3161) for SQL Server 2005 Service Pack 2.
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
935356
(http://support.microsoft.com/kb/935356/
)
Cumulative update package (build 3161) for SQL Server 2005 Service Pack 2 is available