OceanBase Database provides an SQL statement for modifying the configurations of a zone, including the region and IDC to which the zone belongs.
Sample statement:
ALTER SYSTEM {ALTER|CHANGE|MODIFY} ZONE zone_name SET [zone_option_list]
zone_option_list:
zone_option [, zone_option ...]
zone_option:
| region
| idc
Notes:
This statement can be executed only in the
systenant.ALTER|CHANGE|MODIFYspecifies the action to take. TheALTER,CHANGE, andMODIFYactions function in the same way. You can use any one of them to modify the region attribute of the zone.zone_namespecifies the name of the target zone. This statement modifies only one zone at a time.zone_option_listspecifies the to-be-modified attributes of the target zone. Multiple attributes must be separated with commas (,).The following attributes can be modified:
region: the name of the region where the zone is located. Default value:default_region.idc: The name of the IDC where the zone is located. This parameter is left empty by default.
Example:
obclient> ALTER SYSTEM ALTER ZONE zone1 SET REGION='HANGZHOU',IDC='HZ1';