|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
temp tablehi 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? If you are doing this from QA then close the connection and see if they go
away. -- Show quoteAndrew J. Kelly SQL MVP "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? > 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 -- Show quotekind regards Greg O Need to document your databases. Use the firs and still the best AGS SQL Scribe http://www.ag-software.com "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? > |
|||||||||||||||||||||||