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.1

    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.1
    iconOceanBase Database
    SQL - V 4.3.1
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    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 attributes of a resource pool

    Last Updated:2026-04-15 08:25:14  Updated
    Share
    What is on this page
    Procedure

    folded

    Share

    You can modify the UNIT, UNIT_NUM, and ZONE_LIST parameters for a resource pool. This topic describes the modification procedure.

    You can use the ALTER RESOURCE POOL statement to modify attributes of a resource pool.

    You can scale up or down a tenant by modifying the attributes of its resource pool. For example, you can increase the value of UNIT_NUM to increase the number of nodes in each zone to scale out the tenant.

    Procedure

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

      obclient -h172.30.xx.xx -P2883 -uroot@sys#cluster -p**** -A
      
    2. Access the database named oceanbase.

      obclient [(none)]> USE oceanbase;
      
    3. Query the DBA_OB_RESOURCE_POOLS view for the configuration information about resource pools.

      To query the configuration information about the resource pool named mq_pool_02, execute the following statement:

      obclient [oceanbase]> SELECT * FROM DBA_OB_RESOURCE_POOLS WHERE NAME = 'mq_pool_02';
      +------------------+------------+-----------+----------------------------+----------------------------+------------+----------------+-------------+--------------+
      | RESOURCE_POOL_ID | NAME       | TENANT_ID | CREATE_TIME                | MODIFY_TIME                | UNIT_COUNT | UNIT_CONFIG_ID | ZONE_LIST   | REPLICA_TYPE |
      +------------------+------------+-----------+----------------------------+----------------------------+------------+----------------+-------------+--------------+
      |             1026 | mq_pool_02 |      NULL | 2023-01-10 23:54:24.177685 | 2023-01-10 23:54:24.177685 |          1 |           1020 | zone1;zone2 | FULL         |
      +------------------+------------+-----------+----------------------------+----------------------------+------------+----------------+-------------+--------------+
      1 row in set
      

      For more information about the DBA_OB_RESOURCE_POOLS view, see DBA_OB_RESOURCE_POOLS.

    4. Execute the ALTER RESOURCE POOL statement to modify the configurations of the resource pool.

      Notice

      • This statement modifies only one attribute at a time. To modify two or more of the UNIT, UNIT_NUM, and ZONE_LIST attributes, execute this statement multiple times.
      • When you modify the ZONE_LIST attribute, you can add or remove only one zone at a time.

      The syntax is as follows:

      ALTER RESOURCE POOL pool_name
          UNIT [=] unit_name,
          UNIT_NUM [=] unit_num,
          ZONE_LIST [=] ('zone' [, 'zone' ...]);
      

      The parameters are described as follows:

      • pool_name: the name of the resource pool.

      • UNIT: the unit config for the resource pool.

      • UNIT_NUM: the number of resource units. When you add resource units, make sure that the value of UNIT_NUM does not exceed the number of OBServer nodes in each zone.

        Notice

        If a resource pool is allocated to a tenant, you cannot modify the UNIT_NUM attribute. You must use the ALTER RESOURCE TENANT statement to modify it.

      • ZONE_LIST: the distribution of the resource pool in zones.

      For more information about the ALTER RESOURCE POOL statement, see ALTER RESOURCE POOL.

      For more information about the ALTER RESOURCE TENANT statement, see ALTER RESOURCE TENANT.

      Here are some examples:

      • The resource pool is not allocated to any tenant

        To set the unit config to 'S2_unit_config', the number of resource units to 3, and ZONE_LIST to 'zone1','zone2','zone3' for the mq_pool_02 tenant, execute the following statements:

        obclient [oceanbase]> ALTER RESOURCE POOL mq_pool_02 UNIT='S2_unit_config';
        Query OK, 0 rows affected
        
        obclient [oceanbase]> ALTER RESOURCE POOL mq_pool_02 UNIT_NUM=3;
        Query OK, 0 rows affected
        
        obclient [oceanbase]> ALTER RESOURCE POOL mq_pool_02 ZONE_LIST=('zone1','zone2','zone3');
        Query OK, 0 rows affected
        
      • The resource pool is allocated to a tenant

        You must use the ALTER RESOURCE TENANT statement to modify the UNIT_NUM attribute of a resource pool allocated to a tenant.

        To set the unit config to 'S2_unit_config', the number of resource units to 3, and ZONE_LIST to 'zone1','zone2','zone3' for the mq_pool_02 tenant, execute the following statements:

        obclient [oceanbase]> ALTER RESOURCE POOL mq_pool_02 UNIT='S2_unit_config';
        Query OK, 0 rows affected
        
        obclient [oceanbase]> ALTER RESOURCE TENANT mq_t2 UNIT_NUM=3;
        Query OK, 0 rows affected
        
        obclient [oceanbase]> ALTER RESOURCE POOL mq_pool_02 ZONE_LIST=('zone1','zone2','zone3');
        Query OK, 0 rows affected
        
    5. Query the DBA_OB_RESOURCE_POOLS view to verify the modification result.

      The query result shows that the values of UNIT_COUNT, UNIT_CONFIG_ID, and ZONE_LIST are updated.

      obclient [oceanbase]> SELECT * FROM DBA_OB_RESOURCE_POOLS WHERE NAME = 'mq_pool_02';
      +------------------+------------+-----------+----------------------------+----------------------------+------------+----------------+-------------------+--------------+
      | RESOURCE_POOL_ID | NAME       | TENANT_ID | CREATE_TIME                | MODIFY_TIME                | UNIT_COUNT | UNIT_CONFIG_ID | ZONE_LIST         | REPLICA_TYPE |
      +------------------+------------+-----------+----------------------------+----------------------------+------------+----------------+-------------------+--------------+
      |             1026 | mq_pool_02 |      NULL | 2023-01-10 23:54:24.177685 | 2023-01-10 23:56:04.961771 |          2 |           1021 | zone1;zone2;zone3 | FULL         |
      +------------------+------------+-----------+----------------------------+----------------------------+------------+----------------+-------------------+--------------+
      1 row in set
      

    Previous topic

    Modify the number of primary zones for a tenant
    Last

    Next topic

    Modify attributes of a tenant
    Next
    What is on this page
    Procedure