/ Published in: SQL
System Memory Analysis for SQL Server
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT mxml.value('(//Record/@time)[1]','bigint') AS NotificationTime ,mxml.value('(//Record/ResourceMonitor/Notification)[1]','nvarchar(36)') AS RM_Notification ,mxml.value('(//Record/ResourceMonitor/Indicators)[1]','int') AS RM_Indicators ,mxml.value('(//Record/ResourceMonitor/NodeId)[1]','bigint') AS RM_NodeID ,mxml.value('(//Record/MemoryNode/@id)[1]','bigint') AS MemNode_ID ,mxml.value('(//Record/MemoryNode/ReservedMemory)[1]','bigint')/1024 AS MemNode_Reserved_MB ,mxml.value('(//Record/MemoryNode/CommittedMemory)[1]','bigint')/1024 AS MemNode_Committed_MB ,mxml.value('(//Record/MemoryNode/SharedMemory)[1]','bigint')/1024 AS MemNode_Shared_MB ,mxml.value('(//Record/MemoryNode/AWEMemory)[1]','bigint')/1024 AS MemNode_AWE_MB ,mxml.value('(//Record/MemoryNode/SinglePagesMemory)[1]','bigint')/1024 AS MemNode_SinglePages_MB ,mxml.value('(//Record/MemoryNode/MultiplePagesMemory)[1]','bigint')/1024 AS MemNode_MultiPages_MB ,mxml.value('(//Record/MemoryNode/CachedMemory)[1]','bigint')/1024 AS MemNode_Cached_MB ,mxml.value('(//Record/MemoryRecord/MemoryUtilization)[1]','int')/1024 AS Memory_Utilization_MB ,mxml.value('(//Record/MemoryRecord/TotalPhysicalMemory)[1]','bigint')/1024 AS TotalPhysMemory_MB ,mxml.value('(//Record/MemoryRecord/AvailablePhysicalMemory)[1]','bigint')/1024 AS AvailPhysMemory_MB ,mxml.value('(//Record/MemoryRecord/TotalPageFile)[1]','bigint')/1024 AS TotalPF_MB ,mxml.value('(//Record/MemoryRecord/AvailablePageFile)[1]','bigint')/1024 AS AvailPF_MB ,mxml.value('(//Record/MemoryRecord/TotalVirtualAddressSpace)[1]','bigint')/1024 AS TotalVAS_MB ,mxml.value('(//Record/MemoryRecord/AvailableVirtualAddressSpace)[1]','bigint')/1024 AS AvailVAS_MB ,mxml.value('(//Record/MemoryRecord/AvailableExtendedVirtualAddressSpace)[1]','bigint')/1024 AS AvailExtendedVAS_MB FROM (SELECT CAST([record] AS XML) FROM [sys].[dm_os_ring_buffers] WHERE [ring_buffer_type] = 'RING_BUFFER_RESOURCE_MONITOR') AS R(mxml) ORDER BY [NotificationTime] DESC