OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Deployer

V3.1.0Community Edition

  • What is obd
  • Quick Start
    • Install obd
    • Quickly deploy OceanBase Database
    • Quickly deploy OCP
    • Deploy an OceanBase cluster on the GUI
  • obd Command
    • Quick deployment command
    • Cluster commands
    • Mirror and repository commands
    • Testing commands
    • Tool commands
    • obdiag commands
    • Binlog commands
    • Telemetry commands
  • User Guide
    • Configuration files
    • Deploy through GUI
      • GUI operation overview
      • Deploy OCP through the GUI
      • Modify components on the GUI
    • Deploy through CLI
      • Deploy OceanBase Database on a single server
      • Deploy OCP Express by using commands
      • Deploy and use obconfigserver
      • Deploy the binlog service
      • Deploy oblogproxy by using the CLI
      • Deploy OCP by using commands
      • Use OCP to take over a cluster deployed by obd
      • Use obd to take over a cluster
      • Add GUI-based monitoring for an existing cluster
      • Upgrade OCP Express
      • Upgrade OceanBase Database
      • Physical Standby Database
        • Deploy primary and standby tenants by using obd
        • Switch the roles of tenants and decouple a standby tenant from the primary tenant
      • Scale out a cluster and change cluster components
      • Performance test
      • Cluster diagnotistics
  • FAQ
    • FAQ
    • How do I upgrade an OBProxy to obproxy-ce 3.2.3?
  • Mode configuration rules
  • Error codes
  • Release Notes
    • Version rules
    • V3.1
      • OceanBase Deployer V3.1.2
      • OceanBase Deployer V3.1.1
      • OceanBase Deployer V3.1.0
    • V3.0
      • OceanBase Deployer V3.0.1
      • OceanBase Deployer V3.0.0
    • V2.10
      • OceanBase Deployer V2.10.1
      • OceanBase Deployer V2.10.0
    • V2.9
      • OceanBase Deployer V2.9.2
      • OceanBase Deployer V2.9.1
      • OceanBase Deployer V2.9.0
    • V2.8
      • OceanBase Deployer V2.8.0
    • V2.7
      • OceanBase Deployer V2.7.0
    • V2.6
      • OceanBase Deployer V2.6.2
      • OceanBase Deployer V2.6.1
      • OceanBase Deployer V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployer V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployer V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployer V2.1.0
    • V2.0
      • OceanBase Deployer V2.0.1
      • OceanBase Deployer V2.0.0
    • V1.6
      • OceanBase Deployer V1.6.2
      • OceanBase Deployer V1.6.1
      • OceanBase Deployer V1.6.0
    • V1.5
      • OceanBase Deployer V1.5.0
    • V1.4
      • OceanBase Deployer V1.4.0
    • V1.3
      • OceanBase Deployer V1.3.3
      • OceanBase Deployer V1.3.2
      • OceanBase Deployer V1.3.0
    • V1.2
      • OceanBase Deployer V1.2.1
      • OceanBase Deployer V1.2.0

Download PDF

What is obd Install obd Quickly deploy OceanBase Database Quickly deploy OCP Deploy an OceanBase cluster on the GUI Quick deployment command Cluster commands Mirror and repository commands Testing commands Tool commands obdiag commands Binlog commands Telemetry commands Configuration files GUI operation overview Deploy OCP through the GUI Modify components on the GUI Deploy OceanBase Database on a single server Deploy OCP Express by using commands Deploy and use obconfigserver Deploy the binlog service Deploy oblogproxy by using the CLI Deploy OCP by using commands Use OCP to take over a cluster deployed by obd Use obd to take over a cluster Add GUI-based monitoring for an existing cluster Upgrade OCP Express Upgrade OceanBase Database Scale out a cluster and change cluster components Performance test Cluster diagnotistics FAQ How do I upgrade an OBProxy to obproxy-ce 3.2.3? Mode configuration rules Error codes Version rules OceanBase Deployer V3.1.2 OceanBase Deployer V3.1.1 OceanBase Deployer V3.1.0 OceanBase Deployer V3.0.1 OceanBase Deployer V3.0.0 OceanBase Deployer V2.10.1 OceanBase Deployer V2.10.0 OceanBase Deployer V2.9.2 OceanBase Deployer V2.9.1 OceanBase Deployer V2.9.0 OceanBase Deployer V2.8.0 OceanBase Deployer V2.7.0 OceanBase Deployer V2.6.2 OceanBase Deployer V2.6.1 OceanBase Deployer V2.6.0 OceanBase Deployer V2.5.0 OceanBase Deployer V2.4.0 OceanBase Deployer V2.3.1 OceanBase Deployer V2.3.0 OceanBase Deployer V2.2.0 OceanBase Deployer V2.1.1 OceanBase Deployer V2.1.0 OceanBase Deployer V2.0.1 OceanBase Deployer V2.0.0 OceanBase Deployer V1.6.2 OceanBase Deployer V1.6.1 OceanBase Deployer V1.6.0 OceanBase Deployer V1.5.0 OceanBase Deployer V1.4.0 OceanBase Deployer V1.3.3 OceanBase Deployer V1.3.2 OceanBase Deployer V1.3.0 OceanBase Deployer V1.2.1 OceanBase Deployer V1.2.0
OceanBase logo

The Unified Distributed Database for the Al Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Deployer
  3. V3.1.0
iconOceanBase Deployer
V 3.1.0Community Edition
Community Edition
  • V 3.2.1
  • V 3.2.0
  • V 3.1.0
  • V 3.0.0
  • V 2.10.1
  • V 2.10.0
  • V 2.9.0
  • V 2.8.0
  • V 2.7.0
  • V 2.6.0
  • V 2.5.0
  • V 2.4.0
  • V 2.3.1
  • V 2.3.0
  • V 2.2.0
  • V 2.1.0
  • V 2.0.0
  • V 1.6.1

Switch the roles of tenants and decouple a standby tenant from the primary tenant

Last Updated:2025-03-21 08:41:19  Updated
share
What is on this page
Concepts
Switchover
Prerequisites
Procedure
Failover
Prerequisites
Procedure
Decouple a standby tenant from the primary tenant
Prerequisites
Procedure

folded

share

An OceanBase cluster supports two tenant roles: PRIMARY and STANDBY. This topic describes how to use OceanBase Deployer (obd) to dynamically switch the roles of tenants and to decouple a standby tenant from the primary tenant.

Concepts

An OceanBase cluster supports two tenant roles: PRIMARY and STANDBY. Generally, a tenant created in normal cases is a primary tenant and a tenant created in the Physical Standby Database solution is a standby tenant.

obd supports dynamically switching the roles of tenants by using commands.

  • Switchover

    A switchover operation changes the role of a tenant as scheduled. After the switchover operation, the roles of the primary tenant and the standby tenant are exchanged. The entire process is completed within seconds, with a recovery point objective (RPO) of 0, indicating no data loss.

  • Failover

    A failover operation is usually performed when a primary tenant is unable to recover from a failure. After the failover operation, the role of the standby tenant changes to PRIMARY. If the standby tenant has been synchronizing with the primary tenant before the failure, there will generally be data loss of hundreds of milliseconds, and the entire failover process is generally completed within seconds.

  • Decoupling

    A decoupling operation is performed to change the role of a standby tenant as scheduled. After the decoupling operation, the standby tenant is decoupled from the primary tenant, and the role of the standby tenant changes to PRIMARY.

Switchover

After a switchover, to maintain the same topology, the other standby tenants under the original primary tenant switch to the new primary tenant, and the other standby tenants under the new primary tenant switch to the new standby tenant. In other words, only the primary and standby tenants involved in the switchover operation are exchanged, while the positions of other tenants remain unchanged. The following figure shows an example.

Switchover

Prerequisites

  • The OceanBase Database version is V4.2.0.0 or later.

  • The clusters where the primary and standby tenants respectively reside are online.

  • The primary and standby tenants are in the NORMAL state and the log transmission status (sync_status) of the standby tenant is NORMAL.

  • The replicas of all log streams of the standby tenant are online.

  • The tenant role (tenant_role) of the primary tenant is PRIMARY.

Procedure

  1. View the primary/standby relationship of the standby tenant:

    obd cluster tenant show clusterB -g
    

    The returned results are as follows:

    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                                     tenant base info                                                                                    |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | sys         | SYS         | MYSQL              | RANDOM       | 1.0     | 1.0     | 2.0G        | 9223372036854775807 | 9223372036854775807 | 2.0G          | 1           | PRIMARY     |
    | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4.0G        | 10000               | 10000               | 5.0G          | 2           | STANDBY     |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                   standby tenant standby info                                                                   |
    +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
    | standby_tenant_name | tenant_status | sync_status | sync_scn_timestamp         | err_code | error_comment | switchover_status | switchover_epoch | log_mode     |
    +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
    | B_a                 | NORMAL        | NORMAL      | 2023-09-14 09:43:00.199589 | 0        |               | NORMAL            | 0                | NOARCHIVELOG |
    +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
    +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                                         standby tenant's primary info                                                                             |
    +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | standby_tenant_name | primary_tenant_info                                                                                                                                                         |
    +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | B_a                 | IP_LIST=10.10.10.1:2881;10.10.10.2:2881;10.10.10.3:2881,USER=standbyro@A_a,PASSWORD=******,TENANT_ID=1002,CLUSTER_ID=1694680744,COMPATIBILITY_MODE=MYSQL,IS_ENCRYPTED=false |
    +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    query primary-standby relation ok
    
    primary-standby relation topology graph
    
    clusterA:A_a
    └── clusterB:B_a
    
  2. Run the switchover command for the standby tenant:

    obd cluster tenant switchover clusterB B_a --tenant-root-password=******
    
  3. View the primary/standby relationship of the original standby tenant again:

    obd cluster tenant show clusterB -g
    

    The returned results are as follows:

    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                                     tenant base info                                                                                    |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | sys         | SYS         | MYSQL              | RANDOM       | 1.0     | 1.0     | 2.0G        | 9223372036854775807 | 9223372036854775807 | 2.0G          | 1           | PRIMARY     |
    | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4.0G        | 10000               | 10000               | 5.0G          | 2           | PRIMARY     |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    query primary-standby relation ok
    
    primary-standby relation topology graph
    
    clusterB:B_a
    └── clusterA:A_a
    

    As show in the returned results, the tenant_role value of the original standby tenant changes to PRIMARY and the primary/standby relationship topology is updated.

Failover

If the primary tenant becomes unavailable, the failover operation is performed to switch a standby tenant to the primary role in order to continue providing services. The failover operation only modifies log files and does not modify data files.

Each OceanBase Database tenant has multiple log streams, and the failover operation needs to achieve data consistency. Therefore, the system selects a timestamp with the smallest system change number (SCN) from the synchronization timestamps of all log streams as the failover timestamp. After the failover, all log streams of the tenant are rolled back to this timestamp.

Notice

If one primary tenant maps to multiple standby tenants, after the role of one standby tenant changes to the new primary tenant, the other standby tenants cannot directly switch to the new primary tenant. In this case, you need to choose between decoupling the other standby tenants from the original primary tenant and performing a failover operation to generate a new primary tenant for the other standby tenants.

Prerequisites

  • The OceanBase Database version is V4.2.0.0 or later.

  • The cluster where the primary tenant resides is unavailable.

  • The cluster where the standby tenant resides is online and the tenant status (tenant_status) of the standby tenant is NORMAL.

  • The replicas of all log streams of the standby tenant are online.

Procedure

  1. View the primary/standby relationship of the standby tenant:

    obd cluster tenant show clusterB -g
    

    The returned results are as follows:

    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                                     tenant base info                                                                                    |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | sys         | SYS         | MYSQL              | RANDOM       | 1.0     | 1.0     | 2.0G        | 9223372036854775807 | 9223372036854775807 | 2.0G          | 1           | PRIMARY     |
    | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4.0G        | 10000               | 10000               | 5.0G          | 2           | STANDBY     |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                   standby tenant standby info                                                                   |
    +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
    | standby_tenant_name | tenant_status | sync_status | sync_scn_timestamp         | err_code | error_comment | switchover_status | switchover_epoch | log_mode     |
    +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
    | B_a                 | NORMAL        | NORMAL      | 2023-09-14 10:44:04.755016 | 0        |               | NORMAL            | 0                | NOARCHIVELOG |
    +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
    +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                                         standby tenant's primary info                                                                             |
    +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | standby_tenant_name | primary_tenant_info                                                                                                                                                         |
    +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | B_a                 | IP_LIST=10.10.10.1:2881;10.10.10.2:2881;10.10.10.3:2881,USER=standbyro@A_a,PASSWORD=******,TENANT_ID=1002,CLUSTER_ID=1694680744,COMPATIBILITY_MODE=MYSQL,IS_ENCRYPTED=false |
    +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    query primary-standby relation ok
    
    primary-standby relation topology graph
    
    clusterA:A_a
    └── clusterB:B_a
    
  2. Run the failover command for the standby tenant:

    obd cluster tenant failover clusterB B_a --tenant-root-password=******
    
  3. View the primary/standby relationship of the original standby tenant again:

    obd cluster tenant show clusterB -g
    

    As shown in the returned results, the tenant_role value of the B_a tenant changes to PRIMARY.

    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                                     tenant base info                                                                                    |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | sys         | SYS         | MYSQL              | RANDOM       | 1.0     | 1.0     | 2.0G        | 9223372036854775807 | 9223372036854775807 | 2.0G          | 1           | PRIMARY     |
    | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4.0G        | 10000               | 10000               | 5.0G          | 2           | PRIMARY     |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    query primary-standby relation ok
    

Decouple a standby tenant from the primary tenant

You can run the decouple command to decouple a standby tenant from the primary tenant, making it an independent regular tenant. This section describes how to decouple a standby tenant from the primary tenant.

Prerequisites

  • The OceanBase Database version is V4.2.0.0 or later.

  • The cluster where the standby tenant resides is online and the tenant status (tenant_status) of the standby tenant is NORMAL.

  • The replicas of all log streams of the standby tenant are online.

Procedure

  1. View the primary/standby relationship of the standby tenant:

    obd cluster tenant show clusterC -g
    

    The returned results are as follows:

    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                                     tenant base info                                                                                    |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | sys         | SYS         | MYSQL              | RANDOM       | 1.0     | 1.0     | 2.0G        | 9223372036854775807 | 9223372036854775807 | 2.0G          | 1           | PRIMARY     |
    | C_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4.0G        | 10000               | 10000               | 5.0G          | 2           | STANDBY     |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                   standby tenant standby info                                                                   |
    +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
    | standby_tenant_name | tenant_status | sync_status | sync_scn_timestamp         | err_code | error_comment | switchover_status | switchover_epoch | log_mode     |
    +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
    | C_a                 | NORMAL        | NORMAL      | 2023-09-14 09:39:32.423752 | 0        |               | NORMAL            | 0                | NOARCHIVELOG |
    +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
    +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                                         standby tenant's primary info                                                                             |
    +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | standby_tenant_name | primary_tenant_info                                                                                                                                                         |
    +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | C_a                 | IP_LIST=10.10.10.1:3881;10.10.10.2:3881;10.10.10.3:3881,USER=standbyro@B_a,PASSWORD=******,TENANT_ID=1002,CLUSTER_ID=1694681525,COMPATIBILITY_MODE=MYSQL,IS_ENCRYPTED=false |
    +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    query primary-standby relation ok
    
    primary-standby relation topology graph
    
    clusterA:A_a
    └── clusterB:B_a
        └── clusterC:C_a
    
  2. Run the decouple command for the standby tenant:

    obd cluster tenant decouple clusterC C_a --tenant-root-password=******
    
  3. View the primary/standby relationship of the original standby tenant again:

    obd cluster tenant show clusterC -g
    

    As shown in the returned results, the tenant_role value of the C_a tenant changes to PRIMARY.

    +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |                                                                                     tenant base info                                                                                    |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    | sys         | SYS         | MYSQL              | RANDOM       | 1.0     | 1.0     | 2.0G        | 9223372036854775807 | 9223372036854775807 | 2.0G          | 1           | PRIMARY     |
    | C_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4.0G        | 10000               | 10000               | 5.0G          | 2           | PRIMARY     |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    query primary-standby relation ok
    

Previous topic

Deploy primary and standby tenants by using obd
Last

Next topic

Scale out a cluster and change cluster components
Next
What is on this page
Concepts
Switchover
Prerequisites
Procedure
Failover
Prerequisites
Procedure
Decouple a standby tenant from the primary tenant
Prerequisites
Procedure