FIX: Selecting TEXT/IMAGE with Insensitive Cursor May Disconnect

ID: Q195539


The information in this article applies to:
  • Microsoft SQL Server version 6.5

BUG #: 18280 (SQLBUG_65)

SYMPTOMS

Repeatedly opening an insensitive cursor that selects TEXT or IMAGE columns may cause a handled access violation (AV), resulting in the client being disconnected. This problem only occurs after hundreds of thousands of iterations.


CAUSE

The code for generating worktable IDs, which should always be negative numbers, may occasionally generate a positive value. Permanent tables always have a positive object ID. Due to the positive object ID for a worktable, other paths within the cursor code are treating the table as a permanent table, leading to an access violation.

This bug is not stress-related in any way. A single connection repeatedly opening and closing such a cursor a sufficient number of times may encounter this problem. With a single connection, however, this requires hundreds of thousands of iterations before the first occurrence, and the frequency of occurrence is equally rare.


WORKAROUND

To work around this problem, do either of the following:

  • Use a cursor type other than insensitive when selecting a TEXT or IMAGE column.

    -or-


  • Use the primary key of the table to retrieve the TEXT or IMAGE data only when required in a query outside of the cursor.



STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5. This problem has been corrected in U.S. Service Pack 5a for Microsoft SQL Server version 6.5. For information about downloading and installing the latest SQL Server Service Pack, see http://support.microsoft.com/support/sql/.

For more information, contact your primary support provider.

Additional query words: blob sp_cursoropen work table

Keywords : SSrvErr_Log SSrvGPF SSrvProg kbbug6.50
Version : winnt:6.5
Platform : winnt
Issue type : kbbug


Last Reviewed: November 17, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.