doc-exports/docs/rds/umn/rds_sqlserver_switch_ha.html
Ru, Li Yi f51ec873f3 rds_umn
Reviewed-by: Wagner, Fabian <fabian.wagner@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-06-05 10:42:11 +00:00

6.5 KiB

Manually Switching Between Primary and Standby DB Instances

Scenarios

If you choose to create primary/standby DB instances, RDS will create a primary DB instance and a synchronous standby DB instance in the same region. You can access the primary DB instance only. The standby instance serves as a backup. You can manually promote the standby DB instance to the new primary instance for failover support.

Constraints

  • A DB instance is running properly.
  • The replication between the primary and standby instances is normal.
  • Set the recovery model of your database to FULL instead of SIMPLE.
    • In the SIMPLE recovery model, no incremental backup is performed for the database, so the database cannot be restored to a specified time point.
    • For primary/standby or cluster instances, if the recovery model is set to SIMPLE, no replication relationship will be established for the instances. As a result, a primary/standby switchover or instance class change cannot be performed.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click Service List. Under Database, click Relational Database Service. The RDS console is displayed.
  4. On the Instances page, click the target primary/standby DB instance.
  5. In the DB Information area on the displayed Basic Information page, click Switch in the DB Instance Type field.

    Alternatively, click in the DB instance topology on the Basic Information page to perform a primary/standby switchover.

    A primary/standby switchover may cause service interruptions for some seconds or minutes (depending on the replication delay). If the replication delay is too long, a small amount of data may be lost. To prevent traffic congestion, you are advised to perform a switchover during off-peak hours.

  6. In the Switch Primary/Standby Instances dialog box, click Yes to switch between the primary and standby DB instances.

    If the replication status is Available and the replication delay is greater than 300s, the primary/standby switchover task cannot be delivered.

  7. After a switchover is successful, you can view and manage the DB instance on the Instances page.

    • During the switchover process, the DB instance status is Switchover in progress.
    • In the upper right corner of the DB instance list, click to refresh the list. After the switchover is successful, the DB instance status will become Available.