Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

Does AWS RDS SQL Server support Dynamic Management Views ?

05 September,2022 by Tom Collins

Question: Does AWS RDS SQL Server support Dynamic Management Views ? I want to be able to return memory information , including total server memory and memory pressure 

Answer:   A SQL Server installation on a Windows Server supports Dynamic Management Views (DMV)  . The same applies to AWS RDS SQL Server. 

When you execute a  SELECT @@version on an AWS RDS - it's similar to the following output .:

Microsoft SQL Server 2019 (RTM-CU8) (KB4577194) - 15.0.4073.23 (X64) Sep 23 2020 16:03:08 Copyright (C) 2019 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Datacenter 10.0 <X64> (Build 14393: ) (Hypervisor)

 

To execute these examples  the required permissions are : SELECT permission on object and VIEW SERVER STATE or VIEW DATABASE STATE permission

 

Let's look  through a few examples of system DMVs which are supported  on AWS RDS SQL Server

 

--find total server memory 

SELECT total_physical_memory_kb / 1024 AS MemoryMb FROM sys.dm_os_sys_memory;


--identify memory pressure 



SELECT
    EventTime,
    record.value('(/Record/ResourceMonitor/Notification)[1]', 'varchar(max)') as [Type],
    record.value('(/Record/MemoryRecord/AvailablePhysicalMemory)[1]', 'bigint') AS [Avail Phys Mem, Kb],
    record.value('(/Record/MemoryRecord/AvailableVirtualAddressSpace)[1]', 'bigint') AS [Avail VAS, Kb]
FROM (
    SELECT
        DATEADD (ss, (-1 * ((cpu_ticks / CONVERT (float, ( cpu_ticks / ms_ticks ))) - [timestamp])/1000), GETDATE()) AS EventTime,
        CONVERT (xml, record) AS record
    FROM sys.dm_os_ring_buffers
    CROSS JOIN sys.dm_os_sys_info
    WHERE ring_buffer_type = 'RING_BUFFER_RESOURCE_MONITOR') AS tab
ORDER BY EventTime DESC

If you want to list all the DMVs and Dynamic Management functions execute the query on  Find all DMV and DMF

Some other useful DMVs for Index Analysis on Top 5 SQL Server DMV for Index Analysis


Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Does AWS RDS SQL Server support Dynamic Management Views ?


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer