2.2 CDB_* Views
The CDB_* views can be queried only by users with the SYSDBA
system privilege or SELECT ANY DICTIONARY
privilege, or SELECT_CATALOG_ROLE
role, or by users with direct privileges granted to them.
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 SQLALTER USER
statement
CDB_* views include these hidden columns:
-
CON$NAME
: This column includes the name of the container whose data a given CDB_* row represents -
CDB$NAME
: This column displays the name of the CDB whose data a given CDB_* row represents
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
.
CDB views can return data from different containers in a CDB when queried from the root container. These objects will implicitly convert data to the character set of the root container (AL32UTF8) and then return the result to the user. Some character sets may have character expansion (more bytes needed to represent a character) when converted to AL32UTF8, so there may be data truncation if the view column width is not able to accommodate data from a given PDB.
Data is returned by these views from all open PDBs at the time the query is issued, except for PDBs that are open in RESTRICTED mode. In an Oracle RAC environment, data returned by these views may vary according to the instance to which a session is connected.