Microsoft SQL Server 2000中一個討厭的Bug
1.異常資訊
通過SQL Server Enterprise Manager來修改table結構時,出現如下異常:
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid cursor state
2.工作環境:
MS SQL Server 2004 SP3a
SQL Server Hot fix 8.00.0859 (當時是為了修複Microsoft Reporting Services V1.0的bug才安裝的)
Windows Server 2003
3.查看Select @@Version 運行結果:
Microsoft SQL Server 2000 - 8.00.859 (Intel X86) Sep 18 2003 12:53:45 Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: )
4.Microsoft的相關KB
FIX: An invalid cursor state occurs after you apply Hotfix 8.00.0859 or later in SQL Server 2000
URL: http://support.microsoft.com/kb/831997
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 Microsoft SQL Server 2000 service pack that contains this hotfix.
To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix.
Microsoft已經提供了對應的hotfix來解決上述問題,不過需要聯絡Microsoft Support Services來擷取hotfix。我沒有在網上發現該hotfix的下載。
***
目前,Microsoft SQL Server 2004 Service Pack 4.0(處於測試階段)還沒有正式推出,鬱悶。
只好通過Query Analyzer使用SQL Script指令碼來完成,如:
ALTER TABLE AppRemotingLogger ALTER COLUMN Message VARCHAR(800)
(修改資料表AppRemotingLogger的Message欄位)
Updated:
根據bengxia的指點,可以從如下的URL下載到了SQL2000-KB810185-8.00.0878-ENU.exe
http://support.microsoft.com/?kbid=838166
上述hotfix修複了該bug。