OceanBase Database is a single-process software solution. Its process is named observer. Generally, one physical server or virtual machine (VM) runs an observer process that is uniquely identified by an IP address and a port number. This server is called a node.
Procedure
Log on to the
systenant of the cluster as therootuser.Run the following command to log on. You must replace the related information in the command based on the actual database environment.
obclient -h10.xx.xx.xx -P2883 -uroot@sys -p***** -AFor more information about how to connect to OceanBase Database, see Overview of the Connect to OceanBase Database chapter in Develop Applications in MySQL Mode and Overview of the Connect to OceanBase Database chapter in Develop Applications in Oracle Mode.
Query the
oceanbase.DBA_OB_SERVERSview for information about all nodes in the cluster.obclient [(none)]> SELECT * FROM oceanbase.DBA_OB_SERVERS; +-------------+----------+----+--------------+----------+-----------------+--------+----------------------------+-----------+-----------------------+----------------------------+----------------------------+-------------------------------------------------------------------------------------------+ | SVR_IP | SVR_PORT | ID | ZONE | SQL_PORT | WITH_ROOTSERVER | STATUS | START_SERVICE_TIME | STOP_TIME | BLOCK_MIGRATE_IN_TIME | CREATE_TIME | MODIFY_TIME | BUILD_VERSION | +-------------+----------+----+--------------+----------+-----------------+--------+----------------------------+-----------+-----------------------+----------------------------+----------------------------+-------------------------------------------------------------------------------------------+ | 172.xx.xx.xx| 2882 | 3 | sa128_obv4_3 | 2881 | NO | ACTIVE | 2022-11-14 12:28:49.796499 | NULL | NULL | 2022-11-03 15:37:09.530894 | 2022-11-14 12:28:50.795464 | 4.0.0.0_100000302022111120-7cef93737c5cd03331b5f29130c6e80ac950d33b(Nov 11 2022 20:38:33) | | 172.xx.xx.xx| 2882 | 1 | sa128_obv4_1 | 2881 | NO | ACTIVE | 2022-11-14 11:57:31.763941 | NULL | NULL | 2022-11-03 15:37:08.990683 | 2022-11-14 11:57:32.762787 | 4.0.0.0_100000302022111120-7cef93737c5cd03331b5f29130c6e80ac950d33b(Nov 11 2022 20:38:33) | | 172.xx.xx.xx| 2882 | 2 | sa128_obv4_2 | 2881 | YES | ACTIVE | 2022-11-14 11:35:34.223948 | NULL | NULL | 2022-11-03 15:37:09.490511 | 2022-11-14 11:37:26.542479 | 4.0.0.0_100000302022111120-7cef93737c5cd03331b5f29130c6e80ac950d33b(Nov 11 2022 20:38:33) | +-------------+----------+----+--------------+----------+-----------------+--------+----------------------------+-----------+-----------------------+----------------------------+----------------------------+-------------------------------------------------------------------------------------------+ 3 rows in setFields in the query result are as follows:
SVR_IP: the IP address of the node.SVR_PORT: the RPC port of the node.ZONE: the zone where the node is located.SQL_PORT: the SQL port of the node. You can use this port to directly connect to OceanBase Database.WITH_ROOTSERVER: specifies whether the node is the RootServer of the cluster. The RootServer is responsible for cluster management.STATUS: the status of the node. Valid values:ACTIVE: indicates that the node is available.INACTIVE: indicates that the node is unavailable.DELETING: indicates that the node is being deleted.
STOP_TIME: the point in time when the node is stopped. If the value isNULL, the node runs properly.START_SERVICE_TIME: the point in time when the node is started. If the value isNULL, the node is not started.BLOCK_MIGRATE_IN_TIME: the start point in time when replica migration is prohibited. If the value isNULL, replicas can be properly migrated.BUILD_VERSION: the version number of the OceanBase Database software.
For more information about the
oceanbase.DBA_OB_SERVERSview, see oceanbase.DBA_OB_SERVERS.
More information
For more node-related O&M operations, see the following topics: