SQL語句完成查詢SQL Server內存應用狀態。本站提示廣大學習愛好者:(SQL語句完成查詢SQL Server內存應用狀態)文章只能為提供參考,不一定能成為您想要的結果。以下是SQL語句完成查詢SQL Server內存應用狀態正文
SELECT type,--Clerk的類型 sum(virtual_memory_reserved_kb)as vm_Reserved_kb,--保存的內存 sum(virtual_memory_committed_kb)as vm_Committed_kb,--提交的內存 sum(awe_allocated_kb)as awe_Allocated_kb,--開啟AWE後應用的內存 sum(shared_memory_reserved_kb)as sm_Reserved_kb,--同享的保存內存 sum(shared_memory_committed_kb)as sm_Committed_kb,--同享的提交內存 sum(single_pages_kb)as SinlgePage_kb,-- Buffer Pool中的Stolen的內存 sum(multi_pages_kb)as MultiPage_kb-- MemToLeave的內存 FROM sys.dm_os_memory_clerks GROUP BY type ORDER BYtype --查詢Buffer Pool/Memory To Leave SELECT sum(virtual_memory_reserved_kb)AS [Reserved], sum(virtual_memory_committed_kb)AS [Commit], sum(virtual_memory_reserved_kb)/sum(virtual_memory_committed_kb) AS[Reserved/Commit], sum(single_pages_kb)+sum(multi_pages_kb) AS [Stolen], sum(virtual_memory_committed_kb)+sum(single_pages_kb)AS [Buffer Pool], sum(multi_pages_kb) AS[MemToLeave], SUM(awe_allocated_kb)AS [AWEAllocated] FROM sys.dm_os_memory_clerks --查詢SQLSERVER內存應用 select * from sys.dm_os_process_memory