When working with the new multitenant architecture of Oracle 12c, one is often confronted with questions like “Ok, is this or that possible in the pluggable database? And where is that value stored?”. In this article, I want to show you where the parameters of the pluggable databases are stored. Hint: there is no SPFILE for a pluggable database!
Consider the following container database (CDB), named “cdb2”, with the following pluggable databases (PDBs). Using SQL*Plus, connected to the CDB, we can issue
Read the rest of this entry
show pdbs to get a list of the PDBs and their status:
Update: Starting with Oracle 126.96.36.199, it is possible to save a PDB state so this workaround is no longer necessary.
When starting up an Oracle 12c database with pluggable databases, the pluggable databases in a container database are not automatically opened, just placed in MOUNT mode. This can be a problem in some cases.
To automatically open the pluggable databases on startup, you’ll have to create an
AFTER STARTUP trigger in the CDB. For my own reference, I will post such a trigger here:
CREATE TRIGGER open_all_pdbs
AFTER STARTUP ON DATABASE
EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE ALL OPEN';