All Products
Search
Document Center

ApsaraDB RDS:How do I view the memory usage of an ApsaraDB RDS for SQL Server instance?

Last Updated:Aug 07, 2024

This topic describes how to view the memory usage of an ApsaraDB RDS for SQL Server instance.

Note

Take note of the following items:

  • Before you perform high-risk operations, such as modifying the configurations or data of Alibaba Cloud instances, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.

  • Before you modify the configurations or data of an instance, such as an Elastic Compute Service (ECS) instance or an RDS instance, we recommend that you create snapshots or enable backup for the instance. For example, you can enable log backup for an RDS instance.

  • If you granted permissions on sensitive information or submitted sensitive information in the Alibaba Cloud Management Console, we recommend that you modify the sensitive information at the earliest opportunity. Sensitive information includes usernames and passwords.

Procedure

  1. Connect to the RDS instance from a client. For more information, see Connect to an ApsaraDB RDS for SQL Server instance.

  2. Execute the following SQL statement to view the memory usage in MB of each database in the buffer pool:

    SELECT COUNT(*) * 8 / 1024 AS "Cache Size(MB)",
           CASE 
               WHEN Database_ID = 32767 THEN 'ResourceDb'
               ELSE DB_NAME(Database_ID)
           END AS "Database"
    FROM sys.dm_os_buffer_descriptors
    GROUP BY DB_NAME(Database_ID), 
             Database_ID
    ORDER BY "Cache Size(MB)" DESC;
  3. Execute the following SQL statement to view the memory usage of the sys.dm_os_memory_clerks view:

    SELECT * FROM sys.dm_os_memory_clerks;

Application scope

ApsaraDB RDS for SQL Server

References