• alen teplitsky (8/10/2011)


    could have been bugs in earlier versions of sql 2005 but i used to have problems with temp tables not being deleted. my indexing maintenance was a stored procedure and it would create temp tables for the indexes that needed to be maintained. used to have issues with it failing because the table was already in tempdb. ended up using table variables to fix it

    Most likely the issues were in regards with the indexes unless you used global temp tables. The SQL engine makes sure that a temp table has a unique name even if is created at the same time from multiple connections by adding to the name ______ followed by a unique code. However if the procedure code creates indexes to the temp table the names would not be unique as they are created explicitly as they are specified, if the case.

    There is no issues with temp tables themselves and never been.

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist