SQL statement to query the memory usage of SQL Server, SQL Server

Source: Internet
Author: User

SQL statement to query the memory usage of SQL Server, SQL Server

SELECT type, -- Clerk type sum (bytes) as vm_Reserved_kb, -- reserved memory sum (bytes) as vm_Committed_kb, -- Submitted memory sum (awe_allocated_kb) as awe_Allocated_kb, -- the memory used after AWE is enabled sum (bytes) as sm_Reserved_kb, -- shared reserved memory sum (bytes) as sm_Committed_kb, -- shared committed memory sum (single_pages_kb) as SinlgePage_kb, -- Memory sum (multi_pages_kb) of Stolen in Buffer Pool as MultiPage_kb -- Memory of MemToLeave FROM sys. sort group by type ORDER BYtype -- Query Buffer Pool/Memory To LeaveSELECT sum (virtual_memory_reserved_kb) AS [Reserved], sum (virtual_memory_committed_kb) AS [Commit], sum (Limit) /sum (bytes) 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 -- queries SQLSERVER memory using select * from sys. dm_ OS _process_memory

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.