FIX: Deadlocks Leave Orphaned Temp Tables, Generate 2540 Errors

ID: Q152514


The information in this article applies to:


SYMPTOMS

On multiprocessor computers, orphaned tables are left in the tempdb database. Additionally, 2540 errors are generated in tempdb.


CAUSE

If a client repeatedly runs a stored procedure that creates tables in tempdb, it is possible to encounter deadlocks on the tempdb system tables. When this happens the temp tables will not always be cleaned up after the stored procedure terminates or when the client disconnects. This happens only on multiprocessor computers. It has not been replicated on any uniprocessor computer.


WORKAROUND

Restart SQL Server to clear the temporary tables. To prevent the problem from recurring, upgrade to Microsoft SQL Server version 6.50.


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. It has been fixed in Microsoft SQL Server version 6.50.


Keywords          : 
Version           : 4.21a 6.0
Platform          : 
Issue type        : 

Last Reviewed: March 26, 1999