Home All Groups Group Topic Archive Search About
Author
27 Aug 2005 12:05 AM
ichor
hi i have a huge stored proc in which i created a few temp tables (#temp,
#temp1, #temp2 etc).

when i see the tempdb databse the temp tables are still there even after teh
SP has executed, and returned no errors.
i can t even drop them using drop table #temp because it has some extra
chars post fixed at the end.

#temp_______________________________________________________________________________________________________________000000011322


how do i resolve this?

Author
27 Aug 2005 1:04 AM
Andrew J. Kelly
If you are doing this from QA then close the connection and see if they go
away.

--
Andrew J. Kelly  SQL MVP


Show quote
"ichor" <ic***@hotmail.com> wrote in message
news:%23Od8EspqFHA.2880@TK2MSFTNGP12.phx.gbl...
> hi i have a huge stored proc in which i created a few temp tables (#temp,
> #temp1, #temp2 etc).
>
> when i see the tempdb databse the temp tables are still there even after
> teh SP has executed, and returned no errors.
> i can t even drop them using drop table #temp because it has some extra
> chars post fixed at the end.
>
> #temp_______________________________________________________________________________________________________________000000011322
>
>
> how do i resolve this?
>
Author
27 Aug 2005 1:05 AM
GregO
Hi,
Temp tables are only deleted after the connection is drop or closed.  So
maybe the connection is still open?

I tend to have a drop statement at the end of my SP for all temp tables
created .  I find programmically it is cleaner when I know I have done a
clean up


--
kind regards
Greg O
Need to document your databases.  Use the firs and still the best AGS SQL
Scribe
http://www.ag-software.com

Show quote
"ichor" <ic***@hotmail.com> wrote in message
news:%23Od8EspqFHA.2880@TK2MSFTNGP12.phx.gbl...
> hi i have a huge stored proc in which i created a few temp tables (#temp,
> #temp1, #temp2 etc).
>
> when i see the tempdb databse the temp tables are still there even after
> teh SP has executed, and returned no errors.
> i can t even drop them using drop table #temp because it has some extra
> chars post fixed at the end.
>
> #temp_______________________________________________________________________________________________________________000000011322
>
>
> how do i resolve this?
>

AddThis Social Bookmark Button