FIX: Delete Where Current of Cursor Causes Server Instability (185964)



The information in this article applies to:

  • Microsoft SQL Server 6.5

This article was previously published under Q185964
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 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:

197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a

For more information, contact your primary support provider.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbfix KB185964