oceanbase.DBA_OB_TENANTS

2024-06-28 05:30:30  Updated

Purpose

The oceanbase.DBA_OB_TENANTS view displays the basic information of tenants.

  • 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_TYPE column.
  • 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.0.0.

Columns

Column Type Nullable? Description
TENANT_ID bigint(20) NO The ID of the tenant. Valid values:
  • 1: the sys tenant.
  • Other values: a user tenant or meta tenant.
TENANT_NAME varchar(128) NO The name of the tenant.
TENANT_TYPE varchar(4) NO
  • SYS: the sys tenant.
  • USER: a user tenant.
  • META: a meta tenant.
CREATE_TIME timestamp(6) YES The time when the tenant was created.
MODIFY_TIME timestamp(6) YES The time when the tenant was last modified.
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.
  • If this column has a valid value, the locality change is not completed.
  • The value NULL indicates that no locality change was performed.
COMPATIBILITY_MODE varchar(6) NO
  • MySQL mode
  • Oracle mode
STATUS varchar(64) NO The current status of the tenant. Valid values:
  • NORMAL: The tenant is normal.
  • RESTORE: The tenant is undergoing physical restore.
  • CREATING: The tenant is being created.
  • DROPPING: The tenant is being dropped.
IN_RECYCLEBIN varchar(3) NO Indicates whether the tenant has been dropped and is in the recycle bin. Valid values:
  • YES: The tenant is in the recycle bin.
  • NO: The tenant is not in the recycle bin.
LOCKED varchar(3) NO Indicates whether the tenant is locked. Valid values:
  • YES: The tenant is locked.
  • NO: The tenant is not locked.
The value of this column is controlled by the ALTER TENANT xxx LOCK|UNLOCK command.
TENANT_ROLE varchar(100) NO The role of the tenant in the cluster. Valid values:
  • PRIMARY: a primary tenant.
  • STANDBY: a standby tenant.
  • RESTORE: The tenant is being restored.
SWITCHOVER_STATUS varchar(100) NO The switchover status. Valid values:
  • NORMAL: indicates that no switchover is performed for the current tenant.
  • PREPARE SWITCHING TO PRIMARY: indicates that the current tenant is preparing for a switchover to the primary tenant.
  • SWITCHING TO PRIMARY: indicates that the current tenant is being switched to the primary tenant.
  • PREPARE FLASHBACK: indicates that the current tenant is preparing for flashback.
  • FLASHBACK: indicates that the current tenant is in the flashback status.
  • PREPARE SWITCHING TO STANDBY: indicates that the current tenant is preparing for a switchover to a standby tenant.
  • SWITCHING TO STANDBY: indicates that the current tenant is being switched to a standby tenant.
SWITCHOVER_EPOCH bigint(20) NO The unique ID of the switchover or failover.
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:
  • ARCHIVELOG: indicates that log archiving is enabled.
  • NOARCHIVELOG: indicates that log archiving is not enabled.
ARBITRATION_SERVICE_STATUS varchar(64) NO The arbitration service status of the tenant. Valid values:
  • ENABLING: The arbitration service is being enabled for the tenant.
  • ENABLED: The arbitration service is enabled for the tenant.
  • DISABLING: The arbitration service is being disabled for the tenant.
  • DISABLED: The arbitration service is disabled for the tenant.
UNIT_NUM bigint(20) NO The number of resource units in each zone.

Note

This column is introduced since OceanBase Database V4.2.0.

COMPATIBLE varchar(65536) NO The compatibility version.

Note

This 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 tenant. For a user tenant, the value varies based on the actual situation.

Note

This column is introduced since OceanBase Database V4.2.0.

Contact Us