SQL Server Performance Forum – Threads Archive
Temp tables not being removed automatically.
Has anyone else noticed this behavior? I’m seeing local temporary tables still created when the calling connection has disconnected. The behavior is that it should drop the local temp table on a disconnect but it’s defenitly not.<br /><br />I know it’s good practice to always explicitly drop temp tables (and I do), but not everybody follows the rules all the time. <img src=’/community/emoticons/emotion-1.gif’ alt=’
Are you saying this happens in SQL 2005 or 2k.
To the best of my knowledge haven’t I seen such a behaviour before. As you are sure, that these are local temp tables, can you narrow down this issue to certain circumstances or does this happen randomly? —
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Heute schon gebloggt?http://www.insidesql.de/blogs
Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)
Yes, this is 2005 with local temp tables. I going to try reproducing it this weekend on another server.
Seems to be related to this one specific server. I cannot duplicate it on other servers of the same build.
One more reason why people outside the administrative staff should not be building thier own servers…
[<img src=’/community/emoticons/emotion-1.gif’ alt=’

This is an interesting occurence, if you could post up the cause when you identify it I’d appreciate it.
Well, I would put some more time & effort into this, but considering that this machine has every piece of software known to MS on it I’m not really going to investigate too far. It’s also the only one out of six that I tested on that had this problem. The machine has defenite network issues, that I do know for sure.<br /><br />I blame the dev guys. Who knows what they’ve done to this poor little machine.. <img src=’/community/emoticons/emotion-1.gif’ alt=’

Have you checked for open connections when these temp tables are still setting out there? Also, is there a version of VS installed? If so, which one? MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
Yeah, I’d say their not being dropped because the session is still active.
quote:Originally posted by derrickleggett
Have you checked for open connections when these temp tables are still setting out there? Also, is there a version of VS installed? If so, which one?
MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
Nope, no hung or ghosted connections. There is VS installed, 2005 that gets installed with the SQL client tools install.
I was using the SQLManager to create temp tables and not VS.
[email protected] When life gives you a lemon, fire the DBA.
]]>