1

On my server many users performing complex queries using tempdb. Sometimes a failed specifying boundary values ​​obtained are very large tables.

So I want to know who created this temporary table.

When I do:

select * from tempdb.dbo.sysobjects where xtype = 'U' order by name 

I get the names of the tables like this:

# tablename__________000000004EB1

How to determine the SPID user who created this table.

marc_s
  • 8,932
  • 6
  • 45
  • 51
Arty
  • 407
  • 5
  • 7
  • 1
    Hey @Arty, I've blogged about this too (though the second half of the blog post is only really useful for SQL Server 2012+): http://sqlperformance.com/2014/05/t-sql-queries/dude-who-owns-that-temp-table – Aaron Bertrand May 21 '14 at 16:49
  • Thanks to @AaronBertrand for pointing out the existing response for the link to the blog. Am surprised at how curved solution exists for this problem. – Arty May 22 '14 at 08:20

0 Answers0