Thursday, 21 June 2018

Check tempdb used by different processes



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

No comments:

Post a Comment

CPU queries in SQL server

-- Database Wise CPU Utilization report -- CPU_Time(Ms): CPU Time in Milliseconds -- CPUPercent: Let’s say this instance is using 50% CP...