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