Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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

V4.3.0Community Edition

  • What is obd
  • Quick Start
    • Install obd
    • Quick deployment of OceanBase Database
    • Quickly deploy OCP
  • obd Command
    • Quick deployment commands
    • Cluster commands
    • Command groups
    • Image and repository commands
    • Test command groups
    • Tool commands
    • obdiag commands
    • Binlog service commands
    • Hardware commands
    • License commands
    • Password commands
    • Telemetry commands
  • User Guide
    • Usage overview
    • Deploy through GUI
      • Overview
      • Pattern configuration rules
      • Deploy an OceanBase cluster
      • Deploy OCP
      • Deploy OMS
      • Change components
      • Upgrade OCP
      • Upgrade OMS
    • Deploy through CLI
      • Configuration file
      • Component deployment
        • Deploy an OceanBase cluster
        • Deploy seekdb
        • Deploy obconfigserver
        • Deploy OMS
        • Deploy OCP
        • Deploy Alertmanager
        • Deploy obbinlog
        • Deploy oblogproxy
      • Cluster management
        • Physical Standby Database
          • Create a standby tenant
          • Role switching and decoupling
          • Switch the synchronization mode between primary and standby tenants
        • seekdb primary/standby instance
          • Create a standby instance
          • Role switching and decoupling
        • Scale out and component changes
        • Performance test
        • Diagnose a cluster
        • Backup and restore
        • Add a GUI monitoring system to an existing cluster
      • Cluster management
        • Use OCP to take over an OceanBase cluster deployed by obd
        • Take over an OceanBase cluster
      • Component upgrade
        • Upgrade OceanBase Database
        • Upgrade ODP
        • Upgrade OMS
  • Upgrade obd
  • FAQ
  • Error codes
  • Release Notes
    • Version rules
    • V4.3
      • OceanBase Deploy V4.3.0
    • V4.2
      • OceanBase Deployment Tool V4.2.0
    • V4.1
      • OceanBase Deployer V4.1.0
    • V4.0
      • OceanBase Deployer V4.0.0
    • V3.6
      • OceanBase Deployer V3.6.0
    • V3.5
      • OceanBase Deployer V3.5.0
    • V3.4
      • OceanBase Deployer V3.4.0
    • V3.3
      • OceanBase Deployer V3.3.0
    • V3.2
      • OceanBase Deployer V3.2.2
      • OceanBase Deployer V3.2.1
      • OceanBase Deployer V3.2.0
    • 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 Deployment Tool V2.8.0
    • V2.7
      • OceanBase Deployment Tool V2.7.0
    • V2.6
      • OceanBase Deployment Tool V2.6.2
      • OceanBase Deployment Tool V2.6.1
      • OceanBase Deployment Tool V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployment Tool V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployment Tool V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployment Tool V2.1.0
    • V2.0
      • OceanBase Deployment Tool V2.0.1
      • OceanBase Deployment Tool 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
  • Interactive deployment of OceanBase Database Community Edition
  • Deploy a Community Edition cluster using the obd graphical interface
  • Deploy a Community Edition cluster by using an obd configuration file

Download PDF

What is obdInstall obdQuick deployment of OceanBase DatabaseQuickly deploy OCPQuick deployment commandsCluster commandsCommand groupsImage and repository commandsTest command groupsTool commandsobdiag commandsBinlog service commandsHardware commandsLicense commandsPassword commandsTelemetry commandsUsage overviewOverviewPattern configuration rulesDeploy an OceanBase clusterDeploy OCPDeploy OMSChange componentsUpgrade OCPUpgrade OMSConfiguration fileUpgrade obdFAQError codesVersion rulesOceanBase Deploy V4.3.0OceanBase Deployment Tool V4.2.0OceanBase Deployer V4.1.0OceanBase Deployer V4.0.0OceanBase Deployer V3.6.0OceanBase Deployer V3.5.0OceanBase Deployer V3.4.0OceanBase Deployer V3.3.0OceanBase Deployer V3.2.2OceanBase Deployer V3.2.1OceanBase Deployer V3.2.0OceanBase Deployer V3.1.2OceanBase Deployer V3.1.1OceanBase Deployer V3.1.0OceanBase Deployer V3.0.1OceanBase Deployer V3.0.0OceanBase Deployer V2.10.1OceanBase Deployer V2.10.0OceanBase Deployer V2.9.2OceanBase Deployer V2.9.1OceanBase Deployer V2.9.0OceanBase Deployment Tool V2.8.0OceanBase Deployment Tool V2.7.0OceanBase Deployment Tool V2.6.2OceanBase Deployment Tool V2.6.1OceanBase Deployment Tool V2.6.0OceanBase Deployer V2.5.0OceanBase Deployer V2.4.0OceanBase Deployment Tool V2.3.1OceanBase Deployer V2.3.0OceanBase Deployment Tool V2.2.0OceanBase Deployer V2.1.1OceanBase Deployment Tool V2.1.0OceanBase Deployment Tool V2.0.1OceanBase Deployment Tool V2.0.0OceanBase Deployer V1.6.2OceanBase Deployer V1.6.1OceanBase Deployer V1.6.0OceanBase Deployer V1.5.0OceanBase Deployer V1.4.0OceanBase Deployer V1.3.3OceanBase Deployer V1.3.2OceanBase Deployer V1.3.0OceanBase Deployer V1.2.1OceanBase Deployer V1.2.0Interactive deployment of OceanBase Database Community EditionDeploy a Community Edition cluster using the obd graphical interfaceDeploy a Community Edition cluster by using an obd configuration file
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogWhite PaperLive DemosTraining & CertificationTicket
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. V4.3.0
iconOceanBase Deployer
V 4.3.0Community Edition
Databases
  • OceanBase Database
  • OceanBase Cloud
  • OceanBase Tugraph
  • Interactive Tutorials
  • OceanBase Best Practices
Tools
  • OceanBase Cloud Platform
  • OceanBase Migration Service
  • OceanBase Developer Center
  • OceanBase Migration Assessment
  • OceanBase Admin Tool
  • OceanBase Loader and Dumper
  • OceanBase Deployer
  • Kubernetes operator for OceanBase
  • OceanBase Diagnostic Tool
  • OceanBase Binlog Service
Connectors and Middleware
  • OceanBase Database Proxy
  • Embedded SQL in C for OceanBase
  • OceanBase Call Interface
  • OceanBase Connector/C
  • OceanBase Connector/J
  • OceanBase Connector/ODBC
  • OceanBase Connector/NET
Community Edition
  • V 4.3.0
  • 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

Role switching and decoupling

Last Updated:2026-06-30 14:40:58  Updated
Share
What is on this page
Concepts
Switchover
Prerequisites
Procedure
Failover
Prerequisites
Procedure
Decouple primary and standby tenants
Prerequisites
Procedure

folded

Share

OceanBase Database supports role switching and decoupling for tenants. This topic describes how to use obd to dynamically change the role of a tenant and how to decouple primary and standby tenants.

Concepts

OceanBase Database supports two tenant roles: PRIMARY and STANDBY. A normal tenant is a PRIMARY tenant. A tenant created by using a physical standby database is a STANDBY tenant.

obd allows you to dynamically change the role of a tenant by using commands.

  • Switchover

    Switchover is a planned operation that changes the roles of primary and standby tenants. After you execute the switchover operation, the primary and standby tenants exchange their roles. Data is not lost during the operation, the RPO is 0, and the operation takes only a few seconds.

  • Failover

    Failover is an unplanned operation that changes the role of a standby tenant to PRIMARY when the primary tenant is unavailable. If you execute the failover operation on a standby tenant that has been synchronizing data from the primary tenant, data loss of hundreds of milliseconds occurs during the operation, and the operation takes only a few seconds.

  • Decoupling

    Decoupling is a planned operation that changes the role of a standby tenant to PRIMARY. After you execute the decoupling operation, the standby tenant is decoupled from the primary tenant.

Switchover

After you execute the switchover operation, the topology remains unchanged. The other standby tenants under the original primary tenant are switched to the new primary tenant, and the other standby tenants under the new primary tenant are switched to the new standby tenant. Only the two primary and standby tenants involved in the switchover operation exchange their roles. The other tenants remain in their original positions, as shown in the following figure.

Prerequisites

  • OceanBase Database is of V4.2.0.0 or later.

  • The primary and standby tenants are online. You can execute the obd cluster display command to view the status of the cluster.

  • The status of the primary and standby tenants is NORMAL, and the sync_status of the standby tenant is NORMAL. You can execute the obd cluster tenant show command to view the status.

  • The role of the primary tenant is PRIMARY.

  • When you switch a standby tenant to a primary tenant by using network-based data synchronization, all replicas of the standby tenant must be online.

  • When you switch a standby tenant to a primary tenant by using log archiving-based data synchronization, you must back up and archive the standby tenant before you execute the switchover operation. For more information, see Back up and restore data > Tenant backup.

Procedure

  1. Execute the following command to view the primary and standby relationships of the standby tenant:

    obd cluster tenant show clusterB -g
    

    The output is 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. Execute the switchover command on the standby tenant:

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

    obd cluster tenant show clusterB -g
    

    The output is 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
    

    In the output, the role of the original standby tenant has been updated to PRIMARY, and the topology of the primary and standby relationships has been updated.

Failover

Failover is an unplanned operation that changes the role of a standby tenant to PRIMARY when the primary tenant is unavailable. Failover only modifies log files, not data files.

OceanBase Database has multiple log streams for each tenant. To ensure data consistency after the failover operation, the system selects the smallest SCN among all log streams as the execution point of the failover operation. After the failover operation, all log streams under the tenant are rolled back to this point.

Notice

In a one-primary-and-multi-standby scenario, after you execute the failover operation to change a standby tenant to a primary tenant, the other standby tenants cannot be switched to the new primary tenant. You must choose to decouple the other standby tenants or execute the failover operation on them to generate new primary tenants.

Prerequisites

  • OceanBase Database is of V4.2.0.0 or later.

  • The primary tenant is unavailable.

  • The standby tenant is online, and its status is NORMAL.

  • All replicas of the standby tenant are online.

Procedure

  1. Execute the following command to view the primary and standby relationships of the standby tenant:

    obd cluster tenant show clusterB -g
    

    The output is 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. Execute the failover command on the standby tenant:

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

    obd cluster tenant show clusterB -g
    

    The output is 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
    

Decouple primary and standby tenants

You can execute the decouple command to decouple a standby tenant from the primary tenant. This topic describes how to execute the decouple command to decouple primary and standby tenants.

Prerequisites

  • OceanBase Database is of V4.2.0.0 or later.

  • The standby tenant is online, and its status is NORMAL.

  • All replicas of the standby tenant are online.

Procedure

  1. Execute the following command to view the primary and standby relationships of the standby tenant:

    obd cluster tenant show clusterC -g
    

    The output is 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. Execute the decouple command on the standby tenant:

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

    obd cluster tenant show clusterC -g
    

    The output is 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           | PRIMARY     |
    +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
    query primary-standby relation ok
    

Previous topic

Create a standby tenant
Last

Next topic

Switch the synchronization mode between primary and standby tenants
Next
What is on this page
Concepts
Switchover
Prerequisites
Procedure
Failover
Prerequisites
Procedure
Decouple primary and standby tenants
Prerequisites
Procedure