Stranded objects in TempDB - SQL 2K5 Dev Edition

  • We seem to be experiencing an excess of stranded objects in TempDB on high volume datasets in SQL 2005 Developer Edition.  Any one else experiencing this?  Any thoughts on how to clean up these objects without cycling the service?

  • This was removed by the editor as SPAM

  • When I create a temp table or other temp objects then when after writing Create Table #TableName line as a part of the statement I add on the next line: Drop Table #TableName. Then I make a space between these 2 lines and write more code in between. This way you will not forget to drop the table. Another way is to use local temp tables ##TableName. They go away when the connection is closed.

    Regards,Yelena Varsha

  • We actually are already following best practice and using explicit drop statements but have experienced some unusual behavoir such that under certain circumstances where an error or other disconnect occurs, the object becomes stranded.  Even after all connections are closed or terminated.

  • I've also experienced this issue.  We have several temp tables that do not get dropped when the scope of the procedure is finished.  And we are using local temp tables (#temp) not global temp tables.



    A.J.
    DBA with an attitude

  • For anyone who stumbles upon this, this is a known issue and is addressed in SP2 for SQL 2005.

  • Thanks for the info.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply