Microsoft KB Archive/159042

= FIX: DYNAMIC Cursor Fails to Release Sh_Page Lock =

Article ID: 159042

Article Last Modified on 7/19/2006

-

APPLIES TO


 * Microsoft SQL Server 6.5 Standard Edition
 * Microsoft Open Database Connectivity 2.5

-



This article was previously published under Q159042



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 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 6.5 and Open Database Connectivity versions 2.5 and 2.65. For information about how to download and install the latest SQL Server Service Pack, see the following Microsoft Web site:

http://www.microsoft.com/sql/prodinfo/previousversions/downloads/servicepacks.mspx

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: kbbug kbfix kbinterop kbother KB159042

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.