Note
This view is available starting with V4.0.0.
Purpose
This view displays the basic information of a tenant.
- When you query this view as the system tenant, the information of all tenants is displayed, including the system tenant, user-created tenant (user tenant), and Meta tenant. You can distinguish the tenant types based on the
TENANT_TYPEcolumn. - When you query this view as a user tenant, only the information of the current tenant is displayed.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID.
|
| TENANT_NAME | varchar(128) | NO | The name of the tenant. |
| TENANT_TYPE | varchar(4) | NO |
|
| CREATE_TIME | timestamp(6) | YES | The creation time of the tenant. |
| MODIFY_TIME | timestamp(6) | YES | The last update time of the information. |
| PRIMARY_ZONE | varchar(128) | YES | The primary zone of the tenant. |
| LOCALITY | varchar(4096) | NO | The distribution information of the tenant replicas. |
| PREVIOUS_LOCALITY | varchar(4096) | NO | The locality information before the change.
|
| COMPATIBILITY_MODE | varchar(6) | NO |
|
| STATUS | varchar(64) | NO | The current status of the tenant.
|
| IN_RECYCLEBIN | varchar(3) | NO | Indicates whether the tenant is in the recycle bin.
|
| LOCKED | varchar(3) | NO | Indicates whether the tenant is locked.
ALTER TENANT xxx LOCK|UNLOCK statement. |
| TENANT_ROLE | varchar(100) | NO | The cluster role.
NoteThis column is available starting with V4.1.0. |
| SWITCHOVER_STATUS | varchar(100) | NO | The SWITCHOVER status.
NoteThis column is available starting with V4.1.0. |
| SWITCHOVER_EPOCH | bigint(20) | NO | The unique identifier of the SWITCHOVER/FAILOVER.
NoteThis column is available starting with V4.1.0. |
| SYNC_SCN | bigint(20) unsigned | NO | The snapshot version that has been synchronized for the current tenant. This column is meaningless for the system tenant and the Meta tenant, and is displayed as NULL.
NoteThis column is available starting with V4.1.0. |
| REPLAYABLE_SCN | bigint(20) unsigned | NO | The snapshot version that can be replayed for the current tenant. This column is meaningless for the system tenant and the Meta tenant, and is displayed as NULL.
NoteThis column is available starting with V4.1.0. |
| READABLE_SCN | bigint(20) unsigned | NO | The snapshot version that can be read for the current tenant. This column is meaningless for the system tenant and the Meta tenant, and is displayed as NULL.
NoteThis column is available starting with V4.1.0. |
| RECOVERY_UNTIL_SCN | bigint(20) unsigned | NO | The maximum recovery point for the current tenant. This column is meaningless for the system tenant and the Meta tenant, and is displayed as NULL.
NoteThis column is available starting with V4.1.0. |
| LOG_MODE | varchar(100) | NO | The archive mode.
NoteThis column is available starting with V4.1.0. |
| ARBITRATION_SERVICE_STATUS | varchar(64) | NO | The arbitration service status of the tenant. Valid values:
NoteThis column is available starting with V4.1.0. |
| UNIT_NUM | bigint(20) | NO | The minimum value of the UNIT_NUM of all zones of the tenant.
Note
|
| ZONE_UNIT_NUM_LIST | varchar(65536) | NO | The number of units in each zone of the tenant.
Note
|
| COMPATIBLE | varchar(65536) | NO | The compatibility version.
NoteThis column was introduced in V4.2.0. |
| MAX_LS_ID | bigint(20) | NO | The largest log stream ID that ever existed for the tenant. The value is 1 for the system tenant and the meta tenant, and the actual value for user tenants.
NoteThis column was introduced in V4.2.0. |
| RESTORE_DATA_MODE | varchar(128) | NO | The data restore mode of the tenant. Valid values:
NoteThis column was introduced in V4.3.2. |
| FLASHBACK_LOG_SCN | bigint(20) | NO | The latest log stream ID that was trimmed for the tenant. After a failover, you can use the standby tenant to trim logs to a specified point in time and then add the standby tenant to the new primary tenant.
NoteThis column was introduced in V4.4.1. |
| COMMENT | varchar(4096) | NO | The comment. |
| PROTECTION_MODE | varchar(128) | NO | The protection mode of the current tenant. Only MAXIMUM PERFORMANCE (maximum performance) is supported.
NoteThis column was introduced in V4.6.0. |
| PROTECTION_LEVEL | varchar(128) | NO | The protection level of the current tenant. Only MAXIMUM PERFORMANCE (maximum performance) is supported.
NoteThis column was introduced in V4.6.0. |
Sample query
Query the basic information of the current user tenant.
obclient(root@mysql001)[oceanbase]> SELECT * FROM oceanbase.DBA_OB_TENANTS\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
TENANT_NAME: mysql001
TENANT_TYPE: USER
CREATE_TIME: 2026-03-16 16:31:59.903787
MODIFY_TIME: 2026-03-16 16:32:05.881113
PRIMARY_ZONE: zone1
LOCALITY: FULL{1}@zone1
PREVIOUS_LOCALITY: NULL
COMPATIBILITY_MODE: MYSQL
STATUS: NORMAL
IN_RECYCLEBIN: NO
LOCKED: NO
TENANT_ROLE: PRIMARY
SWITCHOVER_STATUS: NORMAL
SWITCHOVER_EPOCH: 0
SYNC_SCN: 1774943436763416000
REPLAYABLE_SCN: 1774943436763416000
READABLE_SCN: 1774943436763416000
RECOVERY_UNTIL_SCN: 4611686018427387903
LOG_MODE: NOARCHIVELOG
ARBITRATION_SERVICE_STATUS: DISABLED
UNIT_NUM: 1
ZONE_UNIT_NUM_LIST: zone1:1
COMPATIBLE: 4.6.0.0
MAX_LS_ID: 1001
RESTORE_DATA_MODE: NORMAL
FLASHBACK_LOG_SCN: NULL
COMMENT:
PROTECTION_MODE: MAXIMUM PERFORMANCE
PROTECTION_LEVEL: MAXIMUM PERFORMANCE
1 row in set
