All Products
Search
Document Center

ApsaraDB RDS:Create a read-only SQL Server instance

Last Updated:Mar 30, 2026

Read-only instances offload read traffic from the primary instance, expanding read capacity without modifying your primary workload. ApsaraDB RDS for SQL Server uses native AlwaysOn technology to replicate the primary instance physically, keeping read-only instances in sync automatically. This feature is available for SQL Server 2017, 2019, and 2022 EE on RDS Cluster Edition.

For an overview of read-only instance features, limits, and use cases, see Overview of read-only ApsaraDB RDS for SQL Server instances. Eligible primary instances also support fast initialization, which reduces creation time to minutes without affecting primary I/O performance.

Prerequisites

Before you begin, ensure that you have:

  • A primary instance running 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 instances are not supported)

If your primary instance runs Basic Edition or High-availability Edition, upgrade it to Cluster Edition before proceeding. If you do not have a primary instance, create one that meets the requirements above.

Limits

Category Limit
Instance count Up to 7 read-only instances per primary instance
Conversion Cannot convert an existing primary instance to a read-only instance
Data replication During creation, data is replicated from the secondary RDS instance to the read-only instance, avoiding interruption to the primary instance
Creation time Scales with the primary instance's data volume and I/O performance; evaluate and optimize these factors to reduce wait time
Storage Storage capacity of a read-only instance cannot be less than that of the primary instance
Backup Backup policies are configured on the primary instance only; read-only instances do not support separate backup settings, manual backups, creating temporary instances from backup files or any point in time, or overwriting instances with backup sets. After a read-only instance is created, you cannot use backup sets to overwrite the primary instance to restore data.
Data migration Migrating data directly to read-only instances is not supported
Database management Creating or deleting databases on read-only instances is not supported
Account management Creating or deleting accounts, granting permissions, or changing passwords on read-only instances is not supported; accounts from the primary instance are synchronized and can only perform read operations

Billing

Read-only instances are billed by subscription or pay-as-you-go. For pricing details, see Pricing.

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

Create a read-only instance

Create a read-only instance from 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 where the primary instance resides. Find the instance and click its ID.

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

image.png
  1. Configure basic resources, then click Next: Instance Configuration. For details, see Storage classes. Specify the instance family, then configure CPU cores, memory capacity, and maximum connections. Storage capacity includes data space, system file space, log file space, and transaction file space. The available range depends on the instance type and storage type you selected. Adjust in increments of at least 5 GB.

    1. Configure the Storage Capacity.

    Place the read-only instance in the same zone as your Elastic Compute Service (ECS) instance for optimal performance. Instances in different zones within the same region have slightly lower performance.
    Each instance type has a defined set of CPU cores, memory, maximum connections, and maximum IOPS. To maintain I/O performance for data synchronization, set the read-only instance memory to be equal to or greater than the primary instance memory.
    The storage capacity of a read-only instance cannot be less than that of the primary instance. For local SSD instances, storage space is tied to the instance type; this restriction does not apply to ESSDs or standard SSDs.
    Billing method When to use Key benefit
    Subscription Long-term use More cost-effective than pay-as-you-go for extended periods; lower prices for longer durations. Configure the Subscription Duration in the lower part of the page.
    Pay-as-you-go Short-term or evaluation use Billed hourly based on actual usage. Release the instance at any time and billing stops immediately. Switch to subscription after confirming the instance meets your requirements.
    Category Resource allocation Key benefit
    General-purpose instance types Memory and I/O: dedicated. CPU and storage: shared Cost-effective
    Dedicated instance types All CPU, memory, storage, and I/O resources: dedicated. The dedicated host instance family exclusively occupies all resources of the host. Better performance and stability
  2. Configure network and instance settings, then click Next: Confirm Order. Select the same VPC as your ECS instance for internal network communication. Instances in different VPCs cannot communicate over the internal network. Instances using different vSwitches in the same VPC can communicate over the internal network.

    1. Configure optional parameters as needed. If you have no special requirements, keep the default values.

    Parameter Description
    Release Protection Available for pay-as-you-go instances. Enable release protection to prevent accidental instance deletion.
    Resource Group Use the default resource group or select a custom one.
    Instance Name 2–255 characters. Allowed: letters, digits, underscores (_), and hyphens (-). Must start with a letter or Chinese character.
    Character Set Collation Rule Defaults to the primary instance's system collation.
  3. Review the Parameter Configuration, Quantity, and Subscription Duration (for subscription instances). Click Confirm Order and complete the payment.

    For subscription instances, enable Auto-renewal to avoid service interruptions. Instance creation takes 1 to 10 minutes. Refresh the page to view the new instance.

View a read-only instance

View read-only instances from any of three locations in the console.

On the Instances page

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

  2. Find the read-only instance and click its ID.

On the Basic Information page of the primary instance

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

  2. Find the primary instance and click its ID.

  3. On the Basic Information page, hover over the read-only instance count and click the ID of the target read-only instance.

On the Cluster Management page

Prerequisites: Read/write splitting is enabled on the Cluster Management page. For details, see Enable read/write splitting.

  1. Log on to the ApsaraDB RDS console.

  2. Find the primary instance and click its ID.

  3. In the navigation pane, click Cluster Management.

  4. Find the read-only instance and click its ID.

What's next

After the read-only instance is created, enable the read/write splitting endpoint and configure the weight ratio for the read-only address. The system routes read requests based on the configured weight ratio.

FAQ

Does changing the configuration, releasing, or switching the billing method of a read-only instance affect the primary instance?

No.

Can I manage accounts on read-only instances?

Accounts created on the primary instance are synchronized to read-only instances, but account management is not available on read-only instances. Accounts on read-only instances can only perform read operations.

Can I convert a read-only instance to a primary instance if the primary fails?

No, this is not supported.

Do read-only instances support backup?

No. Backups are managed on the primary instance. Read-only instances do not support backup settings or manual backup.

Do read-only instances support parallel replication?

Yes. ApsaraDB RDS for SQL Server uses parallel replication by default.

How are transaction logs cleared?

Transaction logs are cleared in two phases:

  • Log truncation: Runs automatically with each log backup. Long-running transactions, synchronization waits, or kernel issues can block truncation.

  • Log shrinking: Included in daily regular backups. You can also shrink logs manually in the RDS console.

What causes replication latency and how do I fix it?

During creation, data is replicated from the secondary RDS instance. After creation, all updates on the primary instance are automatically synchronized to read-only instances.

Common causes and fixes:

Cause Fix
Read-only instance specs too low — a large primary instance drags a smaller read-only instance, causing lag Upgrade the read-only instance type
Large concurrent transactions — locks, slow SQL, or uncommitted queries delay replication Identify and resolve the long-running transactions
Kernel bug Upgrade the major engine version or the minor engine version

To diagnose latency, use the SQL Server autonomy service or run the following query on the primary instance:

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

Key columns in the result:

Column Meaning
log_send_queue_size Volume of log data waiting to be sent to the read-only instance. Higher values indicate greater lag.
redo_queue_size Volume of log data waiting to be applied on the read-only instance. Higher values indicate greater lag.

Why don't I see a read-only node option when creating a Cluster Edition instance?

Read-only instances are added to an existing primary instance, not during its initial creation. First create a primary instance that meets these requirements, then follow the procedure in this topic to add a read-only 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

  • Edition: Cluster Edition

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

  • Billing method: Subscription or pay-as-you-go (Serverless instances are not supported)