OceanBase Database is a single-process system. 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 in to the
systenant of the cluster as therootuser.Note that you must specify the corresponding options in the following sample code based on your actual database configurations.
obclient -h10.xx.xx.xx -P2883 -uroot@sys#obdemo -p***** -AFor more information about how to connect to a database, see Connection methods (MySQL mode) or Connection methods (Oracle mode).
Query the
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 setThe columns in the query result are described 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 include: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 was stopped by the user. If the value isNULL, the node runs properly.START_SERVICE_TIME: the point in time when the node can provide external services after the observer process is started on the node. If the value isNULL, the observer process is not started on the node or the node is unavailable.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
DBA_OB_SERVERSview, see DBA_OB_SERVERS.
References
For more node-related O&M operations, see the following topics: