All Products
Search
Document Center

Switch the zone

Last Updated: Jun 23, 2021

When the primary zone fails, OceanBase automatically switches the primary zone based on service conditions. We recommend that you do not manually switch the primary zone. If you need to perform drills for high availability scenarios, you can manually switch the primary zone in the OceanBase management console.

Context

OceanBase Database supports high-availability clusters across multiple zones. The zone that provides the read and write service is the primary zone. Other zones are read-only or backup zones. When the primary zone fails, OceanBase Database automatically switches the primary zone to a new zone to ensure that OceanBase Database remains available. You can manually switch the primary zone by designating a zone as the new primary zone. However, this operation is applicable only to high availability drills.

Context

Note
  • When you switch the primary zone, access to the database is interrupted for a few seconds.

  • To maximize the access performance of OceanBase Database, we recommend that you switch the primary zone back to the original primary zone of the VPC after the drill is completed.

Procedure

  1. Log on to the OceanBase management console.

  2. In the left-side navigation pane, choose Clusters.

  3. Click the name of the target cluster to go to the Cluster Workspace page.

  4. On the Tenants tab, locate the row containing the tenant that requires a primary zone switchover.

  5. Click the more icon in the Actions column, and choose Switch Primary Zone. 1

  6. Set a new primary zone for the current tenant, and click OK. 2

Result

On the Tenant tab, you can see that the status of the tenant is Switching Primary Zone. When the status changes to Running, the primary zone is switched. 3