Description
This statement is used to start an OceanBase cluster.
You only need to run this command when you start OceanBase Database for the first time. You can execute this command only once per cluster. If this command fails, you cannot re-run it. Instead, you must rebuild the OceanBase cluster.
Before you run this command, make sure that all OBServer nodes specified in the command have been started.
Syntax
alter_system_bootstrap_stmt_primary:
ALTER SYSTEM BOOTSTRAP region_zone_server_list;
region_zone_server_list:
region_zone_server [, region_zone_server ...]
region_zone_server:
{
REGION [=] region_name
ZONE [=] zone_name [ IDC [=] idc_info ]
SERVER [=] ip_port
}
ip_port:
'STR_VALUE:INT_VALUE'
Parameter explanation
Parameter |
Description |
|---|---|
| region_name | The region where the Root Service is located. This parameter is specified when you deploy the database across multiple regions and IDCs. |
| zone_name | The zone to which the Root Service belongs. |
| ip_port | The IP address and RPC port number of the Root Service. |
| idc_info | The IDC to which the zone belongs. |
Example
In this example, the Root Service is deployed on the first three OBServer nodes listed in the server parameter. You can separate the OBServer nodes with commas (,).
obclient> ALTER SYSTEM BOOTSTRAP ZONE 'zone1' SERVER 'xxx.xxx.xx.xx1:xxxx', ZONE 'zone2' SERVER 'xxx.xxx.xx.xx2:xxxx', ZONE 'zone3' SERVER 'xxx.xxx.xx.xx3:xxxx';
