For every DBA_* view, a CDB_* view is defined. In the root of a multitenant container database (CDB), CDB_* views can be used to obtain information about tables, tablespaces, users, privileges, parameters, and so on contained in the root and in pluggable databases (PDBs).
CDB_* views are container data objects. When a user connected to the root queries a CDB_* view, the query results will depend on the CONTAINER_DATA
attribute for users for the view. The CONTAINER_DATA
clause of the SQL ALTER USER
statement is used to set and modify users' CONTAINER_DATA
attribute.
The CDB_* views are owned by SYS
, regardless of who owns the underlying DBA_* view.
By default, a user connected to the root will only see data pertaining to the root.
See Also:
Oracle Database Security Guide for more information about container data objects
Oracle Database SQL Language Reference for more information about the CONTAINER_DATA
clause for the SQL ALTER USER
statement
In a PDB, the CDB_* views only show objects visible through a corresponding DBA_* view.
In addition to all the columns found in a given DBA_* view, the corresponding CDB_* view also contains the CON_ID
column, which identifies a container whose data a given CDB_* row represents. In a non-CDB, the value of a CON_ID
column will be 0
.
Data returned by these views depends on whether a given PDB is open at the time the query is issued. In particular, in an Oracle RAC environment, data returned by these view may vary according to the instance to which a session is connected.