Overview

2025-12-09 07:09:36  Updated

System views of OceanBase Database include dictionary views and performance views. This topic provides an overview of dictionary views and system views and describes how to query these views.

Dictionary views

OceanBase Database provides protected data dictionaries and allows you to obtain their information only through dictionary views.

The names of dictionary views provided by OceanBase Database have the following prefixes: information_schema.*, oceanbase.CDB_*, oceanbase.DBA_*, and mysql.*.

  • information_schema.*: This type of view allows you to access database metadata of MySQL tenants, including names of databases and tables, data types of columns, and access privileges on database objects. This type of view is also called a data dictionary or a system catalog.

  • oceanbase.CDB_*: This type of view allows you to obtain information about some database objects of the sys tenant and user tenants. This type of view is available only to the sys tenant.

  • oceanbase.DBA_*: This type of view allows you to obtain information about all objects in the entire database. Only database administrators can access this type of view. The following views are available only to the sys tenant:

    • oceanbase.DBA_OB_RESOURCE_POOLS
    • oceanbase.DBA_OB_ROOTSERVICE_EVENT_HISTORY
    • oceanbase.DBA_OB_SERVERS
    • oceanbase.DBA_OB_SERVER_EVENT_HISTORY
    • oceanbase.DBA_OB_SERVER_JOBS
    • oceanbase.DBA_OB_TENANTS
    • oceanbase.DBA_OB_TENANT_JOBS
    • oceanbase.DBA_OB_UNITS
    • oceanbase.DBA_OB_UNIT_CONFIGS
    • oceanbase.DBA_OB_UNIT_JOBS
    • oceanbase.DBA_OB_ZONES
  • mysql.*: This type of view provides information about data dictionary tables that store database object metadata and system tables for other operational purposes. For example, a view named in the format of mysql.help_* provides guidance on servers, a view named in the format of mysql.time_zone_* records information related to time zones, and the mysql.user and mysql.db views record information related to user privileges.

Performance views

Performance views are derived from virtual tables that are created based on database memory structures. They provide only data related to internal disk structures and memory structures and are called dynamic performance views because they are mainly related to performance.

Names of performance views start with V$. In most cases, a V$ view corresponds to a GV$ view, which is a global V$ view. If you query a GV$ view, all V$ views that meet the query conditions are retrieved.

Query system views

You can log on to the sys tenant or a user tenant and execute the SHOW statement to query views of a specific type.

  • Query oceanbase.CDB_* and oceanbase.DBA_* views and performance views

    obclient> USE oceanbase;
    obclient> SHOW TABLES;
    
  • Query information_schema.* views

    obclient> USE information_schema;
    obclient> SHOW TABLES;
    
  • Query mysql.* views

    obclient> USE mysql;
    obclient> SHOW TABLES;
    

Contact Us