Here's the SQL if you want to play along at home. But I'm too sleepy to do anything with it tonight.
;WITH clerk_kb AS (SELECT [type], --roll up 'ACRUserStore%' & 'SecCtxtACRUserStore' numbers CASE WHEN [name] LIKE 'ACRUserStore%' THEN 'ACRUserStore' WHEN [name] LIKE 'SecCtxtACRUserStore%' THEN 'SecCtxtACRUserStore' ELSE [name] END clerk_name, memory_node_id, pages_kb FROM sys.dm_os_memory_clerks) SELECT GETDATE() AS capture_tm, clerk_name, memory_node_id, SUM(pages_kb) pages_kb FROM clerk_kb --keep the two clerks per database - dbname and {objperm + dbname} - out of results WHERE NOT EXISTS (SELECT 1 FROM sys.databases sdb WHERE PATINDEX('%' + sdb.[name] + '%', clerk_name) > 0) GROUP BY clerk_name, memory_node_id HAVING SUM(pages_kb) > 40000 ORDER BY clerk_name, memory_node_id;
No comments:
Post a Comment