You can modify the IDC of a zone.
Limitations
Currently, you cannot modify the type of a zone.
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 detailed instructions on connecting to a database, see Overview of connection methods.
Execute the following statement to modify the attributes of a zone:
obclient [(none)]> ALTER SYSTEM {ALTER|CHANGE|MODIFY} ZONE zone_name SET [IDC [=]'idc_name'];where
{ALTER|CHANGE|MODIFY}indicates that the features of theALTER,CHANGE, andMODIFYkeywords are the same. You can use any keyword to modify the attributes of the zone.zone_namespecifies the name of the zone whose attributes are to be modified. This statement modifies only one zone at a time.idc_namespecifies the name of the IDC where the zone is located.
For example, to modify the IDC of the current cluster to
HANGZHOU, execute the following statement:obclient [(none)]> ALTER SYSTEM ALTER ZONE zone2 SET IDC 'HANGZHOU';After the statement is executed, you can query the
oceanbase.DBA_OB_ZONESview to verify whether the zone is modified.obclient [(none)]> SELECT * FROM oceanbase.DBA_OB_ZONES; +-------+----------------------------+----------------------------+--------+------+----------+-----------+ | ZONE | CREATE_TIME | MODIFY_TIME | STATUS | IDC | REGION | TYPE | +-------+----------------------------+----------------------------+--------+------+----------+-----------+ | zone1 | 2026-08-06 16:15:04.284505 | 2026-08-06 16:16:19.851845 | ACTIVE | idc1 | HANGZHOU | ReadWrite | | zone2 | 2026-08-06 16:15:04.284505 | 2026-08-06 16:16:19.888215 | ACTIVE | idc1 | HANGZHOU | ReadWrite | +-------+----------------------------+----------------------------+--------+------+----------+-----------+ 2 rows in setFor more information about the
oceanbase.DBA_OB_ZONESview, see oceanbase.DBA_OB_ZONES.
References
For more zone-related O&M operations, see the following topics: