GV$OB_UNITS

2026-04-02 06:23:58  Updated

Note

This view is introduced since OceanBase Database V4.0.0.

Purpose

This view displays the Unit information of the OBServer node where the tenant resides. The system tenant can view the Unit information of all OBServer nodes in the cluster.

Columns

Column Type Nullable? Description
SVR_IP varchar(46) NO IP address of the server.
SVR_PORT bigint(20) NO Port number of the server.
UNIT_ID bigint(20) NO Unit ID.
TENANT_ID bigint(20) NO ID of the tenant to which the Unit belongs.
ZONE varchar(128) NO Zone name.
ZONE_TYPE varchar(128) NO Zone type of the Zone where the Unit resides. Valid values include:
  • NULL: indicates that the value of this column is invalid. This value may appear for a short period of time after an OBServer node restarts.
  • ReadWrite: read-write Zone
  • Encryption: encryption Zone

Note

Introduced in V4.2.0.

REGION varchar(128) NO Name of the region to which the Zone where the Unit resides belongs. The default value is default_region. Valid values include:
  • NULL: indicates that the value of this column is invalid. This value may appear for a short period of time after an OBServer node restarts.

Note

Introduced in V4.2.0.

MAX_CPU double NO Upper limit of CPU specifications.
MIN_CPU double NO Lower limit of CPU specifications.
MEMORY_SIZE bigint(20) NO Memory size in bytes.
MAX_IOPS bigint(20) NO Upper limit of disk IOPS specifications.
MIN_IOPS bigint(20) NO Lower limit of disk IOPS specifications.
IOPS_WEIGHT bigint(20) NO IOPS weight.
MAX_NET_BANDWIDTH bigint(20) YES Maximum network bandwidth of the Unit in bytes.

Note

This view was introduced in OceanBase Database V4.3.4.

NET_BANDWIDTH_WEIGHT bigint(20) YES Network bandwidth weight of the Unit.

Note

This view was introduced in OceanBase Database V4.3.4.

LOG_DISK_SIZE bigint(20) NO Size of the log disk in bytes.
LOG_DISK_IN_USE bigint(20) NO Size of the used log disk in bytes.
DATA_DISK_SIZE bigint(20) YES
  • Size of the local cache that the Unit can use, in bytes, in shared storage (Shared-Storage, SS) mode.
  • In shared-nothing (Shared-Nothing, SN) mode, the value of this column is NULL, indicating that the value is undefined. In this case, the system allows the Unit to compete with other tenants for disk space.

Note

This view was introduced in OceanBase Database V4.3.4.

DATA_DISK_IN_USE bigint(20) NO
  • In SS mode, the size of the local cache that the Unit uses, in bytes.
  • In SN mode, the size of the data disk that the Unit uses, in bytes.
STATUS varchar(64) NO Status of the Unit. Valid values include:
  • NORMAL: normal status
  • MIGRATING IN: migrating in
  • MIGRATING OUT: migrating out
  • MARK DELETING: marked for deletion
  • WAIT GC: waiting for GC data
  • DELETING: data has been GC'd, and is being deleted
  • ERROR: error status
  • CREATE_TIME timestamp(6) NO Creation time of the Unit on the OBServer node.
    REPLICA_TYPE varchar(7) NO Type of the replica. The default value is FULL

    Note

    • For V4.4.x, the REPLICA_TYPE column is available starting with V4.4.0 BP1.
    • For V4.5.x, the REPLICA_TYPE column is available starting with V4.5.0.
    • For V4.2.5, the REPLICA_TYPE column is available starting with V4.2.5 BP7.

    Sample query

    In SN mode, query the Unit information of all OBServer nodes where the tenant resides.

    obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_UNITS\G
    

    The query result is as follows:

    *************************** 1. row ***************************
                  SVR_IP: 172.xx.xxx.xxx
                SVR_PORT: 2882
                 UNIT_ID: 1001
               TENANT_ID: 1002
                    ZONE: zone1
               ZONE_TYPE: ReadWrite
                  REGION: default_region
                 MAX_CPU: 2
                 MIN_CPU: 2
             MEMORY_SIZE: 5368709120
                MAX_IOPS: 9223372036854775807
                MIN_IOPS: 9223372036854775807
             IOPS_WEIGHT: 2
       MAX_NET_BANDWIDTH: 9223372036854775807
    NET_BANDWIDTH_WEIGHT: 2
           LOG_DISK_SIZE: 17394617549
         LOG_DISK_IN_USE: 1732505049
          DATA_DISK_SIZE: NULL
        DATA_DISK_IN_USE: 26578944
                  STATUS: NORMAL
             CREATE_TIME: 2026-01-13 10:59:25.305248
            REPLICA_TYPE: FULL
    1 row in set
    

    References

    Contact Us