Overview
Displays the database metadata of the current tenant.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| DATABASE_NAME | varchar(128) | NO | Database Name |
| IN_RECYCLEBIN | varchar(3) | NO | Whether the database is in the recycle bin:
|
| COLLATION | varchar(128) | NO | Default Database COLLATION |
| READ_ONLY | varchar(3) | NO | Whether the database is in a read-only state. Valid values:
|
| COMMENT | varchar(2048) | NO | Database Description |
| TABLEGROUP_NAME | varchar(128) | NO | Name of the table group bound to the database |
Sample query
Users can query the database metadata of their own 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