Database Reference
In-Depth Information
Only after the PDB is opened will you see the relevant information:
SQL> select count(*) from cdb_data_files where con_id=3;
COUNT(*)
----------
3
Don't get confused with this when assessing the space usage, and verify which user you are logged in! If you
don't get the expected results it is well worth checking the container (available in the sys_context) and your database
connection.
When viewing information about containers you should bear in mind that the first 3 container IDs are always fixed:
Container 0 indicates that the information in the view applies to the whole CDB as such.
Container ID 1 is reserved for the root: CDB$ROOT
Container ID 2 is reserved for the seed PDB: PDB$SEED
For queries against the CDB-views you could add a “where” clause to skip the first three containers by requesting
a CON_ID > 2.
Common physical structures
The Container Database shares a few components with all PDBs. Some of these are optionally shared, others must
be shared. The CDB does not differ much from a non-CDB, except that there are additional files for each Pluggable
Database. Each Container Database uniquely owns the following tablespaces:
SYSTEM
SYSAUX
UNDOTBS1 (multiple of those in RAC)
TEMP
USERS (if the CDB has been created by dbca)
Don't be misled by the existence of the USERS tablespace in the CDB: its only purpose is to prevent data from
accidentally being stored in the SYSTEM tablespace. Remember that user data is stored in the PDBs, not the CDB!
Pluggable Databases have their own SYSTEM, SYSAUX, and optionally TEMP tablespaces plus all the user data files.
Interestingly the TEMP tablespace is called TEMP in the PDB as well as the CDB, the file names indicate that they are
actually different. Additional tablespaces can be added to the PDB just as in any release before Oracle 12.1.
Online redo logs as well as standby redo logs belong to the CDB and are shared with all PDBs. This makes for
interesting scenarios when log mining is required. It is suggested you test your favorite log mining based replication
technology with a high volume of redo generation before promoting it to production!
The control file is neither CDB nor PDB specific, although it obviously has to keep information pertaining to the
PDBs currently plugged into the CDB.
The diagnostic destination used for the Automatic Diagnostic Repository (ADR) is not a physical structure as
such, but it is useful to know that the logging facility is based on the CDB. Individual PDBs do not have their own
diagnostic destination.
 
Search WWH ::




Custom Search