OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.3.3

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.3.3
    iconOceanBase Database
    SQL - V 4.3.3
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Modify a zone

    Last Updated:2024-12-02 03:48:29  Updated
    share
    What is on this page
    Limitations
    Procedure
    References

    folded

    share

    You can modify the region and IDC of a zone.

    Limitations

    Currently, you cannot modify the type of a zone.

    Procedure

    1. Log in to the sys tenant of the cluster as the root user.

      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***** -A
      

      For more information about how to connect to a database, see Connection methods (MySQL mode) or Connection methods (Oracle mode).

    2. 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', REGION [=]'region_name'];
      

      where

      • {ALTER|CHANGE|MODIFY} indicates that the features of the ALTER, CHANGE, and MODIFY keywords are the same. You can use any keyword to modify the attributes of the zone.

      • zone_name specifies the name of the zone whose attributes are to be modified. This statement modifies only one zone at a time.

      • idc_name specifies the name of the IDC where the zone is located.

      • region_name specifies the name of the region where the zone is located.

      For example, to modify the region of the current cluster to Shanghai and the IDC to sh1, execute the following statement:

      obclient [(none)]> ALTER SYSTEM ALTER ZONE zone4 SET REGION 'shanghai',IDC 'sh1';
      
    3. After the statement is executed, you can query the oceanbase.DBA_OB_ZONES view 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 | 2022-12-20 17:50:17.168745 | 2022-12-20 17:50:40.801054 | ACTIVE   | HZ0 | hangzhou | ReadWrite |
      | zone2 | 2022-12-20 17:50:17.168745 | 2022-12-20 17:50:40.809504 | ACTIVE   | HZ0 | hangzhou | ReadWrite |
      | zone3 | 2022-12-20 17:50:17.169804 | 2022-12-20 17:50:40.815833 | ACTIVE   | SH0 | shanghai | ReadWrite |
      | zone4 | 2023-01-06 15:25:07.190559 | 2023-01-06 15:25:29.281242 | INACTIVE | sh1 | shanghai | ReadWrite |
      +-------+----------------------------+----------------------------+----------+-----+----------+-----------+
      4 rows in set
      

      For more information about the oceanbase.DBA_OB_ZONES view, see oceanbase.DBA_OB_ZONES.

    References

    For more zone-related O&M operations, see the following topics:

    • View a zone

    • Add a zone

    • Delete a zone

    • Isolate a zone

    Previous topic

    Delete a zone
    Last

    Next topic

    Isolate a zone
    Next
    What is on this page
    Limitations
    Procedure
    References