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 is located. The system tenant can view the Unit information of all OBServer nodes in the cluster.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the server. |
| SVR_PORT | NUMBER(38) | NO | The port number of the server. |
| Unit_ID | NUMBER(38) | NO | The ID of the Unit. |
| TENANT_ID | NUMBER(38) | NO | The ID of the tenant to which the Unit belongs. |
| ZONE | VARCHAR2(128) | NO | The name of the zone. |
| ZONE_TYPE | VARCHAR2(128) | NO | The zone type of the zone where the Unit is located. Valid values include:
NoteThis field was introduced in V4.2.0. |
| REGION | VARCHAR2(128) | NO | The name of the region to which the zone where the Unit is located belongs. The default value is default_region. The value of this column is NULL when the column is invalid. This value may appear temporarily after an OBServer node is restarted.
NoteThis field was introduced in V4.2.0. |
| MIN_CPU | NUMBER(38) | NO | The lower limit of the CPU specification. |
| MAX_CPU | NUMBER(38) | NO | The upper limit of the CPU specification. |
| MEMORY_SIZE | NUMBER(38) | NO | The memory size in bytes. |
| MIN_IOPS | NUMBER(38) | NO | The lower limit of the disk IOPS specification. |
| MAX_IOPS | NUMBER(38) | NO | The upper limit of the disk IOPS specification. |
| IOPS_WEIGHT | NUMBER(38) | NO | The IOPS weight. |
| MAX_NET_BANDWIDTH | NUMBER(38) | YES | The maximum network bandwidth of the Unit in bytes.
NoteThis field was introduced in V4.3.4. |
| NET_BANDWIDTH_WEIGHT | NUMBER(38) | YES | The weight of the network bandwidth of the Unit.
NoteThis field was introduced in V4.3.4. |
| LOG_DISK_SIZE | NUMBER(38) | NO | The size of the log disk in bytes. |
| LOG_DISK_IN_USE | NUMBER(38) | NO | The size of the log disk in use in bytes. |
| DATA_DISK_SIZE | NUMBER(38) | YES |
NoteThis field was introduced in V4.3.4. |
| DATA_DISK_IN_USE | NUMBER(38) | NO |
|
| STATUS | VARCHAR2(64) | NO | The status of the Unit. NORMAL: normalMIGRATING IN: migrating inMIGRATING OUT: migrating outMARK DELETING: marked for deletionWAIT GC: waiting for garbage collectionDELETING: garbage collection completed, being deletedERROR: error |
| CREATE_TIME | NUMBER(38) | NO | The time when the Unit was created on the OBServer node. |
Sample query
The following example shows how to query the Unit information of all OBServer nodes where the user tenant is located in SN mode.
obclient [SYS]> SELECT * FROM SYS.GV$OB_UNITS\G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
UNIT_ID: 1002
TENANT_ID: 1004
ZONE: zone1
ZONE_TYPE: ReadWrite
REGION: default_region
MIN_CPU: 2
MAX_CPU: 2
MEMORY_SIZE: 5368709120
MIN_IOPS: 9223372036854775807
MAX_IOPS: 9223372036854775807
IOPS_WEIGHT: 2
MAX_NET_BANDWIDTH: 9223372036854775807
NET_BANDWIDTH_WEIGHT: 2
LOG_DISK_SIZE: 17394617549
LOG_DISK_IN_USE: 1751668778
DATA_DISK_SIZE: NULL
DATA_DISK_IN_USE: 29081600
STATUS: NORMAL
CREATE_TIME: 1730257207614632
1 row in set