FIX: Delete Where Current of Cursor Causes Server Instability

ID: Q185964


The information in this article applies to:

BUG #: 17927 (SQLBUG_65)

SYMPTOMS

Using a DELETE WHERE CURRENT OF <cursor> statement can cause several server instabilities, including transient corruption. This can appear in the error log with the following error messages:

Error 605 Attempt to fetch logical page %ld in database '%.*s' belongs to object '%.*s', not to object '%.*s'.

Error 644 The non_clustered leaf row entry for page %ld row %d was not found in index page %ld indexid %d database '%.*s'

Error 624 Attempt to retrieve row from page via RID failed because the requested RID has a higher number than the last RID on the page. %S_RID.%S_PAGE.
These errors are only transient and do not appear if a database consistency check is run. In addition to the corruption, the server can stop responding (hang) and may also experience a handled access violation.


WORKAROUND

Adding an unique index to the table can greatly reduce the occurrence of this problem. You can also work around the problem by rewriting the Transact-SQL to avoid the use of a DELETE WHERE CURRENT OF <cursor> statement.


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: sp sp5prodsql


Keywords          : kbbug6.50 kbfix6.50.SP5 
Version           : winnt:6.5
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: April 13, 1999