Note
This view is available starting with V4.0.0.
Purpose
This view displays the metadata of databases in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| DATABASE_NAME | varchar(128) | NO | The name of the database. |
| IN_RECYCLEBIN | varchar(3) | NO | Indicates whether the database is in the recycle bin.
|
| COLLATION | varchar(128) | NO | The default collation of the database. |
| READ_ONLY | varchar(3) | NO | Indicates whether the database is read-only.
|
| COMMENT | varchar(2048) | NO | The description of the database. |
| TABLEGROUP_NAME | varchar(128) | NO | The name of the table group to which the database is bound.
NoteThis column is available starting with V4.4.1. |
Sample query
In the sys tenant, query the metadata of databases in the current tenant.
obclient> SELECT * FROM oceanbase.DBA_OB_DATABASES LIMIT 1\G
The query result is as follows:
*************************** 1. row ***************************
DATABASE_NAME: oceanbase
IN_RECYCLEBIN: NO
COLLATION: utf8mb4_general_ci
READ_ONLY: NO
COMMENT: system database
TABLEGROUP_NAME: NULL
1 row in set