Article ID: 308881 - View products that this article applies to.
This article was previously published under Q308881
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 55675 (sqlbug_70)
SQL Server may encounter an access violation (AV) with a DECLARE CURSOR statement if the following conditions are true:
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
301511NOTE: The following hotfix was created prior to Microsoft SQL Server 7.0 Service Pack 4.
(http://support.microsoft.com/kb/301511/EN-US/ )INF: How to Obtain the Latest SQL Server 7.0 Service Pack
The English version of this fix should have the following file attributes or later:
NOTE: Because of file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.
Date Time Version Size File name ------------------------------------------------------- 27-SEP-2001 2:08 7.00.1010 4937KB Sqlservr.exe
You can work around this problem in the following ways:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft SQL Server 7.0 Service Pack 4.
The following script illustrates the behavior:
The short stack dump generated in the errorlog will contain the following functions:
(CSubRuleCrsFtchToUnionAllStrategy::BuildSubstitutes+f6) (COptContext::PexprTransformTopLevel+199) (COptContext::PexprNormalize+22) (COptContext::PexprNormalize+a0) (COptContext::PexprNormalize+a0) (COptContext::PexprNormalize+a0) (CMemo::NormalizeQuery+174) (COptContext::PexprSearchPlan+bb) (COptContext::PcxteOptimizeQuery+7eb) (CQuery::Optimize+21f) (CQuery::Prepare+92) (CCvtTree::PqryFromTree+814) (BuildQueryFromTree+61) (CFetchKeyset::CompileQuery+60) (CFetchKeyset::CompileSetFetchExp+321) (CFetchKeyset::CompileKeysetExprs+18) (CFetchKeyset::Compile+10f) (CFetchComponent::smInitializeFetchComponent+fc) (CCursorDeclareStmt::Init+286) (CompileCursor+1f8) (CCompPlan::FCompileStep+e79) (CProchdr::FCompile+5d9) (CSQLSource::FTransform+234) (CSQLStrings::FTransform+159) (CSQLSource::Execute+11d) (language_exec+39c) (execute_event+659) (process_commands+f3) (ProcessWorkRequests+ed) (ThreadStartRoutine+139) (beginthread+ce) (CreateFileA+11b)
Article ID: 308881 - Last Review: February 27, 2014 - Revision: 4.1
Contact us for more help
Connect with Answer Desk for expert help.