Article ID: 312294 - View products that this article applies to.
This article was previously published under Q312294
BUG #: 356004 (SHILOH_BUGS)
If you use a FAST_FORWARD cursor that is built on a query that contains a UNION operator and a remote table, an exception Access Violation (AV) may occur.
You will see an error message in Query Analyzer similar to:
NOTE: Other data access tools return similar error messages. This call stack is in the SQL Server 2000 error log if you do not have any service packs installed:
ODBC: Msg 0, Level 19, State 1 SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. Connection Broken
007E1091 Module(sqlservr+003E1091) CCvtTree::PdrgcidBldColumns 007D8169 Module(sqlservr+003D8169) CCvtTree::PexprBuildQuery 007D775C Module(sqlservr+003D775C) CCvtTree::PexprFromTree 005642A9 Module(sqlservr+001642A9) CCvtTree::PqryFromTree 00564019 Module(sqlservr+00164019) BuildQueryFromTree 005D285A Module(sqlservr+001D285A) CFetchKeyset::CompileQuery 005D3050 Module(sqlservr+001D3050) CFetchKeyset::CompileSetFetchExp 005D32DA Module(sqlservr+001D32DA) CFetchKeyset::CompileKeysetExprs 005D3428 Module(sqlservr+001D3428) CFetchKeyset::Compile 005CF95C Module(sqlservr+001CF95C) CFetchComponent::smInitializeFetchComponent 005B786C Module(sqlservr+001B786C) CCursorDeclareStmt::Init 005BAA16 Module(sqlservr+001BAA16) CompileCursor 0060E7EC Module(sqlservr+0020E7EC) CCompPlan::FCompileStep
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.
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, submit a request to 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=supportNote 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. The English version of this fix should have the following file attributes or later:
NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.
Date Time Version Size File name --------------------------------------------------------------------- 08/11/2001 06:04 AM 8.00.0465.01 7,409,748 bytes Sqlservr.exe
To work around this problem, use a STATIC cursor instead of a FAST_FORWARD cursor.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Several similar problems are also fixed, including cursors built on queries that contain DISTINCT, GROUP BY, HAVING, or aggregates (besides UNION) in conjunction with remote tables or in conjunction with projections of large objects (LOBs) columns (such as text, ntext and image).
REFERENCESSQL Server 2000 Books Online: topics; "DECLARE CURSOR"; "Declaring Cursors"
Contact us for more help
Connect with Answer Desk for expert help.