Purpose
The oceanbase.DBA_OB_TENANTS view displays the basic information of tenants.
- You can query this view from the sys tenant for information about all tenants, including the sys tenant, user tenants, and meta tenants. You can determine the tenant type based on the
TENANT_TYPEcolumn. - You can query this view from a user tenant for information about the current tenant.
Note
This view is introduced since OceanBase Database V4.0.0.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant. Valid values:
|
| TENANT_NAME | varchar(128) | NO | The name of the tenant. |
| TENANT_TYPE | varchar(4) | NO |
|
| CREATE_TIME | timestamp(6) | YES | The time when the tenant was created. |
| MODIFY_TIME | timestamp(6) | YES | The time when the information was updated. |
| PRIMARY_ZONE | varchar(128) | YES | The primary zone of the tenant. |
| LOCALITY | varchar(4096) | NO | The locality of the tenant. |
| PREVIOUS_LOCALITY | varchar(4096) | NO | The locality before the change.
|
| COMPATIBILITY_MODE | varchar(6) | NO |
|
| STATUS | varchar(64) | NO | The current status of the tenant. Valid values:
|
| IN_RECYCLEBIN | varchar(3) | NO | Indicates whether the tenant has been dropped and is in the recycle bin. Valid values:
|
| LOCKED | varchar(3) | NO | Indicates whether the tenant is locked. Valid values:
ALTER TENANT xxx LOCK|UNLOCK command. |
| TENANT_ROLE | varchar(100) | NO | The role of the tenant in the cluster. Valid values:
|
| SWITCHOVER_STATUS | varchar(100) | NO | The switchover status. Valid values:
|
| SWITCHOVER_EPOCH | bigint(20) | NO | The unique ID of the switchover or failover task. |
| SYNC_SCN | bigint(20) unsigned | NO | The snapshot version that has been synchronized for the current tenant. The value is NULL for a sys or meta tenant. |
| REPLAYABLE_SCN | bigint(20) unsigned | NO | The snapshot version that can be replayed for the current tenant. The value is NULL for a sys or meta tenant. |
| READABLE_SCN | bigint(20) unsigned | NO | The snapshot version that can be read for the current tenant. The value is NULL for a sys or meta tenant. |
| RECOVERY_UNTIL_SCN | bigint(20) unsigned | NO | The maximum SCN that can be restored for the current tenant. The value is NULL for a sys or meta tenant. |
| LOG_MODE | varchar(100) | NO | The log archiving mode. Valid values:
|
| ARBITRATION_SERVICE_STATUS | varchar(64) | NO | The arbitration service status of the tenant. Valid values:
|
| UNIT_NUM | bigint(20) | NO | The number of resource units in each zone.
NoteThis column is introduced since OceanBase Database V4.2.0. |
| COMPATIBLE | varchar(65536) | NO | The compatibility version.
NoteThis column is introduced since OceanBase Database V4.2.0. |
| MAX_LS_ID | bigint(20) | NO | The maximum log stream ID of the tenant. The value is 1 for the sys tenant and meta tenants. For user tenants, the value varies based on the actual situation.
NoteThis column is introduced since OceanBase Database V4.2.0. |