BUG: AV When UPDATE STATISTICS in a Cursor Is Terminated
Article ID: 177808
Article Last Modified on 10/3/2003
APPLIES TO
- Microsoft SQL Server 6.5 Standard Edition
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.
Additional query words: tsql t-sql tran-sql trans-sql tran trans temp
Keywords: kbbug kbpending KB177808