SELECT TOP 10 session_id, database_id, user_objects_alloc_page_count + internal_objects_alloc_page_count / 129 AS tempdb_usage_MB
FROM sys.dm_db_session_space_usage
ORDER BY user_objects_alloc_page_count + internal_objects_alloc_page_count DESC
FROM sys.dm_db_session_space_usage
ORDER BY user_objects_alloc_page_count + internal_objects_alloc_page_count DESC
Hi Can you please check if this _(count / 129 A) was a typo error because this should be I guess 128 right.
ReplyDeleteSELECT TOP 10 session_id, database_id, (user_objects_alloc_page_count + internal_objects_alloc_page_count)/128 as tempdb_usage_MBFROM sys.dm_db_session_space_usageORDER BY user_objects_alloc_page_count + internal_objects_alloc_page_count DESC;