Temp tables and associated SPID

  • How do you identify the spid that created a local temporary table and a global temporary table ?

  • The only way I see to link a temporary table to it's creator SPID is to look at the locks.  If the creating process has a lock on the temp table, it will show up in sp_lock.  For local temp tables, only the process that creates it can lock it.  This will not be the case for global temp tables. 

    I do not know if it is possible for global temp tables or local temp tables w/o locks.

    What is it you are trying to do?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply