BUG: AV When UPDATE STATISTICS in a Cursor Is Terminated (177808)



The information in this article applies to:

  • Microsoft SQL Server 6.5

This article was previously published under Q177808
BUG #: 17350 (SQLBUG_65)

SYMPTOMS

If you use the Transact-SQL KILL command to terminate a stored procedure that is running either an UPDATE STATISTICS statement while a cursor is open, or is dropping and re-creating temporary tables within a cursor, a handled access violation (AV) will occur. Only the connection that is executing the UPDATE STATISTICS or dropping and re-creating temporary tables within a cursor will be affected.

WORKAROUND

To work around this problem, do any of the following:
  • Run the UPDATE STATISTICS statement outside the context of an open cursor.
  • Let the process run to completion instead of terminating it with a KILL command.
  • Create and drop the temporary tables outside the cursor.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 6.5.

Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbBug kbpending KB177808