FIX: Err 1203 Running Dynamic Cursor in a Stored Procedure

Last reviewed: July 21, 1997
Article ID: Q165512
The information in this article applies to:
  • Microsoft SQL Server, version 6.5 Service Pack 2
BUG #: 16523

SYMPTOMS

A cursor that is retrieving data from within a stored procedure may fail with error 1203 "Caller of lock manager is incorrectly trying to unlock an unlocked object. Spid=%d locktype=%d dbid=%d lockid=%id". This error may happen a few times, or it may go into an endless loop in the errorlog, quickly filling up the disk it resides on. This problem only occurs on SQL Server version 6.5 Service Pack 2.

CAUSE

The problem occurs when SQL Server upgrades a page lock to a table lock. The dynamic cursor's connection is not informed of the lock escalation, and repeatedly tries to unlock the page lock.

WORKAROUND

To work around this problem, change the cursor from a dynamic cursor to a SCROLL cursor by adding the keyword SCROLL to the cursor create.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5 Service Pack 2. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.


Keywords : kbbug6.50.sp2 kbusage SSrvGen SSrvLock
Version : 6.5 sp2
Platform : WINDOWS
Issue type : kbbug
Resolution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.