SqlServer内存占用查看
Posted 独孤求败
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SqlServer内存占用查看相关的知识,希望对你有一定的参考价值。
SELECT ISNULL(DB_NAME(DATABASE_ID),‘RESOURCEDB‘) AS DATABASENAME, CAST(COUNT(ROW_COUNT) * 8.0 /(1024.0) AS DECIMAL(28,2)) AS ‘SIZE(MB)‘ FROM SYS.dm_os_buffer_descriptors GROUP BY database_id ORDER BY DATABASENAME
SELECT SUM(single_pages_kb)+SUM(MULTI_PAGES_KB) FROM ( SELECT SUM(single_pages_kb) AS single_pages_kb ,SUM(MULTI_PAGES_KB) AS MULTI_PAGES_KB FROM SYS.dm_os_memory_clerks GROUP BY [TYPE] ) AS A UNION SELECT COUNT(ROW_COUNT) * 8.0 FROM SYS.dm_os_buffer_descriptors
以上是关于SqlServer内存占用查看的主要内容,如果未能解决你的问题,请参考以下文章