I'm using SQL Search by redgate to search for a key word and some of my results look like this:
Database | Schema | Object name | Type ...
tempdb | dbo | #6FBF826D | User table ...
How do I find out what this refers to? I had a look in tempdb.sys.all_objects but an object with name '#6FBF826D' isn't in there (although there are others with similar names). Am I lookin开发者_高级运维g in the wrong place?
For that matter, what is meant by 'user table' in this context? I didn't create any tables with names like that.
By the time you went looking for it, it had probably ceased to exist. It may have been a table variable (such variables receive such names in tempdb) - but if its batch had completed before you went looking for it, it would have been automatically removed.
You should never really have to worry about objects in tempdb - they're managed by SQL Server, and added and removed as required.
精彩评论