All Products
Search
Document Center

ApsaraDB RDS:Create a read-only ApsaraDB RDS for SQL Server instance

Last Updated:Dec 01, 2025

When your database experiences significant read pressure, you can create one or more read-only instances to expand read capacity and improve application throughput. ApsaraDB RDS for SQL Server uses native AlwaysOn technology to create read-only instances through physical replication of the primary instance. Data in read-only instances remains consistent with the primary instance, and data updates on the primary instance are automatically synchronized to all read-only instances.

Note

Prerequisites

Read-only RDS instances can be created only for primary RDS instances that meet the following requirements:

  • Instance version: SQL Server 2017 EE on RDS Cluster Edition, SQL Server 2019 EE on RDS Cluster Edition, or SQL Server 2022 EE on RDS Cluster Edition

  • Instance edition: Cluster Edition

  • Instance storage type: Enterprise SSD (ESSD), premium performance disk

  • Billing method: Subscription or pay-as-you-go (Serverless ApsaraDB RDS for SQL Server instances are not supported)

Note
  • Before creating a SQL Server read-only instance, confirm the version or edition of the primary instance on the Basic Information page. If you do not have a primary instance, first create a primary instance that meets the preceding requirements.

  • If your primary instance is Basic Edition or High-availability Edition and you need to create a read-only instance, you can upgrade the primary instance to Cluster Edition and then create a read-only instance.

Usage notes

  • You can create read-only RDS instances for a primary RDS instance. You cannot convert existing primary RDS instances to read-only RDS instances.

  • When you create a read-only RDS instance, the system replicates data from the secondary RDS instance to the read-only RDS instance. This prevents interruptions to your workloads on the primary RDS instance.

  • Number of read-only RDS instances: You can create up to seven read-only RDS instances for a primary RDS instance.

  • Instance backup: You cannot configure backup policies or manually create backups for read-only RDS instances. These are configured and created on the primary RDS instance. You cannot create temporary RDS instances from backup files or any point in time. You cannot overwrite RDS instances by using backup sets. After a read-only RDS instance is created, you cannot use backup sets to overwrite the primary RDS instance to restore data.

  • Data migration: You cannot migrate data to read-only RDS instances.

  • Database management: You cannot create or delete databases on read-only RDS instances.

  • Account management: You cannot create or delete accounts, grant permissions to accounts, or change the passwords of accounts on read-only RDS instances.

  • Instance creation time: The time required to create a read-only RDS instance correlates directly with the data volume and I/O performance of the primary RDS instance. Before creating a read-only RDS instance, we recommend evaluating and optimizing the data volume and I/O performance of the primary RDS instance to shorten the creation time.

  • Storage space: The storage space of a read-only instance cannot be less than that of the primary instance.

Billing rules

You are charged for the read-only RDS instances that you create based on the subscription billing method or the pay-as-you-go billing method. For more information, see Pricing.

Note

If the billing method of the primary RDS instance is serverless, you cannot create read-only RDS instances.

Create a read-only RDS instance

You can create a read-only instance in the RDS console or by calling the CreateReadOnlyDBInstance API.

  1. Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the instance ID.

  2. In the Instance Distribution section, to the right of Read-only Instance, click Add.

    image.png

  3. Configure the basic resources, including the billing method, storage class, and zone. Then, click Next: Instance Configuration.

    1. Select the Billing Method.

      Billing Method

      Recommendations

      Benefit

      Subscription

      A subscription instance is an instance for which you pay an upfront fee. If you want to use an instance for a long period of time, we recommend that you select the Subscription billing method. If you select the subscription billing method, configure the Subscription Duration parameter in the lower part of the page.

      For long-term use, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You are offered lower prices for longer subscription durations.

      Pay-as-you-go

      You are charged on an hourly basis for a pay-as-you-go instance based on your actual resource usage. If you want to use an RDS instance for a short period of time, we recommend that you select the Pay-as-you-go billing method.

      You can create a Pay-as-you-go instance. After you confirm that the created instance meets your business requirements, you can change the billing method of the instance to subscription.

      You can release an instance at any time. The billing stops immediately after you release the instance.

    2. Configure the Storage Type parameter.

      For more information, see Storage classes.

    3. Select the Zone for the instance.

      Note
      • Each zone is an independent physical location within a region. No substantive differences exist between zones in the same region.

      • If the RDS instance resides in the same zone as the Elastic Compute Service (ECS) instance on which your application is deployed, these instances can deliver optimal performance. If the RDS instance and the ECS instance reside in different zones in the same region, the performance is slightly lower than when they reside in the same zone.

    4. Select the Instance Type.

      Specify the category (dedicated or general-purpose instance family). Then, specify the CPU cores, memory capacity, and maximum number of connections.

      Category

      Description

      Benefit

      General-purpose Instance Types

      Dedicated: memory and I/O

      Shared: CPU and storage

      Low cost and cost-effective.

      Dedicated Instance Types

      A dedicated RDS instance occupies all the allocated CPU, memory, storage, and I/O resources.

      Note

      The dedicated host instance family is the highest configuration of the dedicated instance family. A dedicated host RDS instance exclusively occupies all the CPU, memory, storage, and I/O resources of the host on which the RDS instance is deployed.

      A dedicated instance provides better performance and stability.

      Note
    5. Configure the Storage Capacity parameter.

      The storage capacity includes data space, system file space, log file space, and transaction file space. The storage capacity range (minimum and maximum values) depends on the instance type and storage type you selected earlier. You can adjust the storage capacity in increments of at least 5 GB.

      Note
  4. Configure instance resources, such as the network type, vSwitch, and resource group. Then, click Next:Confirm Order.

    1. Network Type is fixed to VPC.

    2. Select VPC and vSwitch of Primary Node.

      We recommend selecting the VPC in which your ECS instance resides for the RDS instance. If the RDS instance and the ECS instance reside in different VPCs, these instances cannot communicate over an internal network.

      Note

      You can connect the RDS instance and the ECS instance over an internal network even if the instances use different vSwitches in the same VPC.

    3. Configure custom parameters. If you do not have special business requirements, you can retain the default values of these parameters.

      Parameter

      Description

      Release Protection

      If you set Billing Method to Pay-as-you-go, you can enable the release protection feature to prevent accidental release of the instance.

      Resource Group

      You can use the default resource group or select a custom resource group as needed.

      Instance Name

      The value must be 2 to 255 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter or Chinese character.

      Character Set Collation Rule

      The default is the system character set collation of the primary instance.

  5. Confirm the Parameter Configuration, Quantity, and Subscription Duration (for subscription instances only), click Confirm Order, and complete the payment.

    Note
    • For subscription instances, we recommend selecting Auto-renewal. This prevents service interruptions if you forget to renew your instance.

    • It takes 1 to 10 minutes to create an instance. You can refresh the page to view the instance.

View a read-only RDS instance

You can view a read-only RDS instance on the Instances page, the Cluster Management page of the required RDS instance, or the Basic Information page of the required RDS instance.

View a read-only RDS instance on the Instances page

  1. Log on to the RDS Management Console. In the navigation pane on the left, click Instances. In the top navigation bar, select a region.

  2. Find the read-only RDS instance and click the ID of the instance.

View a read-only RDS instance on the Basic Information page

You can view read-only instances on the Basic Information page of the primary instance.

  1. Log on to the RDS console. In the navigation pane on the left, click Instances. In the top navigation bar, select the region.

  2. Find the primary RDS instance and click the ID of the instance.

  3. On the Basic Information page of the primary RDS instance, hover over the number of read-only instances and click the ID of the target read-only instance.

View a read-only RDS instance on the Cluster Management page

Prerequisites

You have enabled read/write splitting on the Cluster Management page. For more information, see Enable read/write splitting.

Procedure

  1. Log on to the ApsaraDB RDS console.

  2. Find the primary RDS instance and click the ID of the instance.

  3. In the navigation pane on the left, click Cluster Management.

  4. Find the read-only RDS instance and click the ID of the instance.

What to do next

After the read-only instance is created, you need to enable the read-write splitting connection and configure the weight ratio for the read-only address. The system will process read requests based on the configured weight ratio.

FAQs

Can I change the billing method of my read-only RDS instance?

After I change the configuration of my read-only RDS instance, release the read-only RDS instance, or change the billing method of the read-only RDS instance, is the primary RDS instance affected?

No.

After I create accounts on the primary RDS instance of my database system, can I manage the accounts on the read-only RDS instances?

The accounts created on the primary instance are synchronized to read-only instances, but you cannot manage accounts on read-only instances. The accounts on read-only instances can only perform read operations, not write operations.

If my primary RDS instance fails, can I convert a read-only RDS instance to a regular RDS instance?

Not supported.

Do read-only RDS instances support manual backup or automatic backup?

No, read-only RDS instances do not support backup settings or manual backup initiation because backups are performed on the primary RDS instance.

Do read-only RDS instances support parallel replication?

Yes, read-only RDS instances support parallel replication. By default, ApsaraDB RDS for SQL Server uses parallel replication.

What mechanism is used to clear transaction logs?

The transaction logs of an RDS instance are cleared in the following phases:

  • Log truncation: Log truncation is automatically performed for each log backup. If long-running transactions are executed, synchronization waits occur, or kernel-related issues occur, log truncation cannot take effect.

  • Log shrinking: Daily regular backups include log shrinking. You can also shrink logs in the RDS console.

How is data replicated to read-only RDS instances? If a replication latency occurs between the primary and read-only RDS instances, what are the causes and how do I resolve the issue? How do I view a replication latency?

When you create a read-only RDS instance, the system replicates data from the secondary RDS instance to the read-only RDS instance. After the read-only RDS instance is created, it has the same data as the primary RDS instance. If the data on the primary RDS instance is updated, the system automatically synchronizes the updates to all read-only RDS instances that are attached to the primary RDS instance.

The following section describes the causes and solutions:

  • Cause: The specifications of the primary RDS instance are higher than the specifications of the read-only RDS instance. The read-only instance specifications are too small, causing a large primary-secondary delay when a large primary instance drags a small read-only instance.

    Solution: Upgrade the read-only instance type.

  • Cause: Large concurrent transactions exist causing delay.

    Solution: Check and process large transactions. In most cases, large transactions are caused by locks, slow SQL statements, and uncommitted temporary queries.

  • Cause: The kernel is abnormal due to bugs.

    Solution: Upgrade the major engine version or update the minor engine version of your RDS instance.

You can view diagnostics using the SQL Server autonomy service or by running the following SQL:

SELECT
    ag.name AS [availability_group_name]
    , d.name AS [database_name]
    , ar.replica_server_name AS [replica_instance_name]
    , drs.truncation_lsn
    , drs.log_send_queue_size
    , drs.redo_queue_size
FROM
    sys.availability_groups ag
    INNER JOIN sys.availability_replicas ar
        ON ar.group_id = ag.group_id
    INNER JOIN sys.dm_hadr_database_replica_states drs
        ON drs.replica_id = ar.replica_id
    INNER JOIN sys.databases d
        ON d.database_id = drs.database_id
WHERE drs.is_local=0
ORDER BY
    ag.name ASC, d.name ASC, drs.truncation_lsn ASC, ar.replica_server_name ASC

Why can't I find the read-only node option when creating an RDS SQL Server Enterprise Cluster Edition instance?

Read-only instances must be added separately to a primary instance. First, create a primary instance that meets the following conditions. Then, refer to the procedure in this topic to add a read-only instance.

  • Primary instance version: SQL Server 2017 EE on RDS Cluster Edition, SQL Server 2019 EE on RDS Cluster Edition, or SQL Server 2022 EE on RDS Cluster Edition

  • Primary instance edition: Cluster Edition

  • Primary instance storage type: Enterprise SSD (ESSD), premium performance disk

  • Primary instance billing method: subscription or pay-as-you-go (Serverless ApsaraDB RDS for SQL Server instances are not supported)