OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Deployer

V3.2.1Community Edition
  • What is obd
  • Quick Start
    • Install obd
    • Quickly deploy OceanBase Database
    • Quickly deploy OCP
  • obd Command
    • Quick deployment command
    • Cluster commands
    • Mirror and repository commands
    • Testing commands
    • Tool commands
    • obdiag commands
    • Binlog commands
    • Host commands
    • License commands
    • Password commands
    • Telemetry commands
  • User Guide
    • Overview
    • Deploy through GUI
      • GUI operation overview
      • Mode configuration rules
      • Deploy an OceanBase cluster on the GUI
      • Deploy OCP through the GUI
      • Modify components on the GUI
      • Upgrade OCP on the GUI
    • Deploy through CLI
      • Configuration files
      • Deploy Component
        • Deploy OceanBase Database on a single OBServer node
        • Deploy OCP Express by using commands
        • Deploy and use obconfigserver
        • Deploy the obbinlog
        • Deploy oblogproxy by using the CLI
        • Deploy OCP by using commands
      • Manage Cluster
        • 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
        • Add GUI-based monitoring for an existing cluster
      • Takeover Cluster
        • Use OCP to take over a cluster deployed by obd
        • Use obd to take over a cluster
      • Upgrade Component
        • Upgrade OceanBase Database
        • Upgrade ODP
        • Upgrade OCP Express
      • Backup and restore
  • Upgrade obd
  • FAQ
  • Error codes
  • Release Notes
    • Version rules
    • 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 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

Document Feedback
  1. Documentation Center
  2. OceanBase Deployer
  3. V3.2.1

Use obd to take over a cluster

Last Updated:2026-10-09 07:44:00

Prerequisites
Take over an OceanBase cluster
View the information about an OceanBase cluster
References

Prerequisites

  • The version of the OceanBase cluster to be taken over is OceanBase Database Community Edition V4.2.1 BP4 or later, and OceanBase Shell (obshell) has been started before. For more information, see View the information about an OceanBase cluster.

  • The OceanBase cluster to be taken over is running properly. For more information about how to check the status of the OceanBase cluster, see Check the OBServer node status in OceanBase Database documentation.

  • The server where OceanBase Deployer (obd) is installed is connected to an OBServer node in the OceanBase cluster.

Take over an OceanBase cluster

  1. Take over an OceanBase cluster.

    [admin@obtest ~]$ obd cluster takeover test -h 10.10.10.1 -P 2881 -p ****** -ssh-user=admin --ssh-key-file=/home/admin/.ssh/id_rsa
    

    For more information about the takeover command, see the obd cluster takeover section in the Cluster commands topic.

  2. Query the cluster status in obd.

    [admin@obtest ~]$ obd cluster display test
    

    A sample query result is as follows:

    Get local repositories and plugins ok
    Open ssh connection ok
    Cluster status check ok
    Connect to observer 10.10.10.1:2881 ok
    Wait for observer init ok
    +----------------------------------------------+
    |                    observer                  |
    +------------+---------+------+-------+--------+
    | ip         | version | port | zone  | status |
    +------------+---------+------+-------+--------+
    | 10.10.10.1 | 4.3.0.1 | 2881 | zone1 | ACTIVE |
    +------------+---------+------+-------+--------+
    obclient -h10.10.10.1 -P2881 -uroot -Doceanbase -A
    
    Trace ID: 093ddc0c-039b-11ef-865a-00163e0808cc
    If you want to view detailed obd logs, please run: obd display-trace 093ddc0c-039b-11ef-865a-00163e0808cc
    

View the information about an OceanBase cluster

  1. Log on to the sys tenant of the OceanBase cluster to be taken over as the root user.

    [admin@obtest ~]$ obclient -h10.10.10.1 -P2883 -uroot@sys#obdemo -p -c -Doceanbase -A
    

    The parameters are described as follows:

    • -h: the IP address for connecting to OceanBase Database, which is usually the IP address of OceanBase DataBase Database Proxy (ODP). 10.10.10.1 is used as an example. You can modify it as needed.

    • -u: the tenant account. The following formats are supported: username@tenant name#cluster name, cluster name:tenant name:username, cluster name-tenant name-username, and cluster name.tenant name.username. root@sys#obdemo is used as an example. You can modify it as needed.

      Note

      • When you use ODP to connect to an OceanBase cluster, you can obtain the cluster name in the following way:
        Directly connect to OceanBase Database and run the SHOW PARAMETERS LIKE 'cluster'; command to query the cluster name. In the query result, VALUE indicates the name of the OceanBase cluster.
      • If ODP manages multiple clusters, you must specify a cluster name. If ODP manages only one cluster, you do not need to specify a cluster name.

    • -P: the port for connecting to OceanBase Database. When you directly connect to OceanBase Database, set this parameter to the value of mysql_port. The default value is 2881. When you use ODP to connect to OceanBase Database, set this parameter to the value of listen_port. The default value is 2883. 2883 is used as an example. You can modify it as needed.

    • -c: specifies not to ignore comments in the runtime environment of OceanBase Client (OBClient).

      Note

      Hints are special comments that are not affected by the -c parameter.

    • -A: specifies not to automatically retrieve the statistical information when connecting to the tenant.

    • -D: the name of the database to be accessed. You can change it to a business database.

  2. Query the OceanBase Database version in use.

    obclient [oceanbase]> SELECT OB_VERSION();
    

    A sample query result is as follows:

    +--------------+
    | OB_VERSION() |
    +--------------+
    | 4.3.0.1      |
    +--------------+
    
  3. Query obshell information.

    obclient [oceanbase]> select * from ocs.all_agent;
    

    If obshell information is returned, obshell has been started in the cluster before. A sample query result is as follows:

    +------------+------+---------------+----------------------+-------+--------------+-------+------------+----------+--------------------------------+------------------------------------------------------------------------------------------------------+
    | ip         | port | identity      | version              | os    | architecture | zone  | mysql_port | rpc_port | home_path                      | public_key                                                                                           |
    +------------+------+---------------+----------------------+-------+--------------+-------+------------+----------+--------------------------------+------------------------------------------------------------------------------------------------------+
    | 10.10.10.1 | 2886 | CLUSTER AGENT | 4.2.3.0-102024031414 | linux | x86_64       | zone1 |       2881 |     2882 | /home/admin/oceanbase-ce       | MEgCQQCoegOM/lKWUfz0ZUOg+KK+bpW7jr16xvQy7foOqZc5yB8F+8J5pNvD0pHNH+2IeG2bIMbhnUbV/B0XeqkACD/xAgMBAAE= |
    +------------+------+---------------+----------------------+-------+--------------+-------+------------+----------+--------------------------------+------------------------------------------------------------------------------------------------------+
    

References

  • Connect to OceanBase Database

  • obd cluster takeover

Previous topic

Use OCP to take over a cluster deployed by obd
Last

Next topic

Upgrade OceanBase Database
Next
on this page
Prerequisites
Take over an OceanBase cluster
View the information about an OceanBase cluster
References