FIX: Deadlocks Leave Orphaned Temp Tables, Generate 2540 Errors

Last reviewed: May 5, 1997
Article ID: Q152514
The information in this article applies to:
  • Microsoft SQL Server versions 4.2x and 6.0

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.


Additional query words:
Version : 4.21a 6.0


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.