OceanBase-specific views display information specific to OceanBase Database.
Concept
OceanBase Database defines and implements a series of views to display the metadata and system status information of databases, including information about tables, columns, indexes, users, roles, and privileges. These views are usually stored in the system tablespace, are read-only, and cannot be modified or deleted.
Storage location
OceanBase-specific views of MySQL tenants and the sys tenant are stored in the oceanbase database, and those of Oracle tenants are stored in the SYS schema.
View types
Different view types by scenario
OceanBase-specific views can be classified into data dictionary views and dynamic performance views by scenario and the information displayed.
Note
An OB_* prefix is used to distinguish OceanBase-specific views from other views.
Data dictionary views
OceanBase-specific data dictionary views include the following types:
DBA_OB_*
Views visible only to the
systenant display information about database objects managed by thesystenant, such as theDBA_OB_SERVERSandDBA_OB_UNITSviews. Views that are accessible to all tenants and display the information about OceanBase database objects at the tenant level, such asDBA_OB_LS_LOCATIONSandDBA_OB_TABLEGROUPS.CDB_OB_*
Views that display the information about database objects of all tenants and are accessible in the
systenant only, which are usually tenant-level data dictionary views prefixed withDBA_OB_, such asCDB_OB_LS_LOCATIONSandCDB_OB_TABLEGROUPS.
Dynamic performance views
OceanBase-specific dynamic performance views include the following types:
GV$OB_*
Views of this type display the running status and performance metrics of the entire cluster. They provide global status information and are accessible in the entire cluster. The information returned varies based on the access privileges.
- If you query a view from the
systenant, information about all tenants is returned. - If you query a view from a user tenant, information about the current tenant is returned.
- If you query a view from the
V$OB_*
Views of this type display the running status and performance metrics of only the node to which the client connects. To obtain the status information about other nodes, query
GV$OB_*views.
In versions earlier than OceanBase Database V4.0.0, some OceanBase-specific views do not have the OB_ prefix, such as v$plan_cache_stat and v$obrpc_outgoing. In OceanBase Database V4.0.0 and later, all OceanBase-specific views have the OB_ prefix in their names, such as V$OB_PLAN_CACHE_STAT and V$OB_RPC_OUTGOING.
Different view types by access privilege
OceanBase-specific views can be classified into data dictionary views of the sys tenant and tenant-level data dictionary views by access privilege.
Data dictionary views of the sys tenant
The sys tenant data dictionary views are accessible only to the system administrator (SYSDBA) and system user (SYS). These views display the metadata and system status information of the entire database, including information about tables, columns, indexes, users, roles, and privileges. These views are usually stored in the system tablespace and read-only. You cannot modify or delete them.
Tenant-level data dictionary views
Tenant-level data dictionary views are accessible to regular users and tenant administrators. These views display the metadata and system status information of the current tenant, including information about tables, columns, indexes, users, roles, and privileges. These views are usually stored in the user tablespace and read-only. You cannot modify or delete them. A sys tenant data dictionary view can display the metadata and system status information of the entire database, including information of all tenants. A tenant-level data dictionary view can display the metadata and system status information of only the current tenant, and cannot display information about other tenants.