title: Are temporary tables thread-safe?
body: <p>I'm using SQL Server 2000, and many of the stored procedures it use temp tables extensively. The database has a lot of traffic, and I'm concerned about the thread-safety of creating and dropping temp tables.</p>
  
  <p>Lets say I have a stored procedure which creates a few temp tables, it may even join temp tables to other temp tables, etc. And lets also say that two users execute the stored procedure at the same time. </p>
  
  <ul>
  <li><p>Is it possible for one user to run the sp and which creates a temp table called #temp, and the another user runs the same sp but gets stopped because a table called #temp already exists in the database?</p></li>
  <li><p>How about if the same user executes the same stored procedure twice on the same connection?</p></li>
  <li><p>Are there any other weird scenarios that might cause two users queries to interfere with one another?</p></li>
  </ul>