FIX: DYNAMIC Cursor Fails to Release Sh_Page Lock

ID: Q159042


The information in this article applies to:
  • Microsoft SQL Server version 6.5
  • Microsoft Open Database Connectivity, versions 2.5, 2.65

BUG #: 16185 (SQLBUG_65)

SYMPTOMS

A DYNAMIC cursor may fail to release sh_page lock after sp_cursorclose if both of the following conditions are true:

  • SET IMPLICIT_TRANSACTIONS ON is used.

    -and-


  • The cursor keeps fetching data backward until there is no data found.


An Open Database Connectivity (ODBC) application may encounter this problem when using a server side DYNAMIC cursor with the SQL_AUTOCOMMIT_OFF option. This problem will occur if the ODBC application uses this cursor to keep fetching data backward until there is no data found.


WORKAROUND

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

  • Use SET IMPLICIT_TRANSACTIONS OFF.

    -or-


  • Change to the cursor to a SCROLL cursor.

    -or-


  • Fetch forward rather than backward.



STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5 and Open Database Connectivity versions 2.5 and 2.65. This problem has been corrected in U.S. Service Pack 5a for Microsoft SQL Server version 6.5 and Open Database Connectivity versions 2.5 and 2.65. 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.


MORE INFORMATION

ODBC connections use SET IMPLICIT_TRANSACTIONS ON by default; DB-Library connections do not. Therefore, you are more likely to run into this problem when using an ODBC connection.

Additional query words: prodsql

Keywords : kbinterop kbother SSrvProg kbbug6.50 kbfix6.50.SP5
Version : WINDOWS:2.5,2.65; winnt:6.5
Platform : WINDOWS winnt
Issue type : kbbug


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