Find which session is creating temp tables in temp db

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rkreddypalla
    New Member
    • Dec 2015
    • 1

    Find which session is creating temp tables in temp db

    Can anybody help me to find out which sessions are creating temp tables named like '#children_____ ____00000XXXX' in tempdb. Which are having more than 500,00 rows and not dropped from last two days.
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    From what I've read, if you are using SQLServer2005 - 2008R2 you might be able to pull this from the trace log. In new versions such as 2012 from extended events.

    There are a few blogs out there covering this information; however, this is well beyond my area of expertise. If you will use your favorite search engine with your version of SQL Server, and "who owns that #temp table" as keywords, it should turn up a few such blogs with some explanations behind the techniques.

    Comment

    Working...