Hi All,
Does anyone know where stores SQL Server tempdb object list. From this list you can determine which temporary object belongs to which session. tempdb.sys.objectsor tempdb.sys.sysobjects have two deficiency:
- They don't show the spid of the creator session
- They don't show the referenced object name (temp object name inside the session)
These two simple column or value would allow to determine the tempdb consumption of sessions.
There are two DMVs, sys.dm_db_session_space_usage and sys.dm_db_task_space_usagebut these views do not show correct values (sys.dm_db_session_space_usage do not calculate user object deallocations only internal object deallocations).
SQL Server must stores and use these mappings when a session wants to create or use temporary objects. I searched it in the tempdb data pages but I can not find. Does anybody know where would it be?
Thanks.
m@te