How to create multiple container databases in 12c R1

oracleoracle-12c

As multiple databases can be created under the same/different Oracle home(s) in Oracle 11g on a host, please advise me on creating multiple container databases to create multiple pluggable databases under them to overcome monolithicity of Oracle 12c.

Best Answer

you can create it manually or automatically through dbca

How to start and stop pluggable databases in Oracle 12c

Because the instance architecture of pluggable databases is entirely different from a non-container database, one would imagine that managing their state of readiness is also different. Well, it’s true.

The first thing to remember is that because the CDB maintains the instance for which all PDBs share, that instance must be up and open for people to be able to connect to the PDBs. Starting and stopping the CDB is not different from non-CDBs. The next thing to remember is that when you start a CDB, all of its associated PDBs are left in MOUNT state, which means
that, by default, they are not opened with the CDB.

Unfortunately, 12cR1 doesn’t offer an option to change this behavior. However, 12c does provide a new type of trigger that will fire if it detects a CDB opening and will then open specified PDBs. See the Oracle documentation for further information on setting this up. After starting and opening a CDB, you can open any corresponding PDBs like so

    alter pluggable database orclpdb2 open;
    -- Pluggable database altered.
    -- or
    alter pluggable database all open;

To close PDBs, you can essentially do the opposite of the preceding commands:

 alter pluggable database devpdb1 close;
 -- Pluggable database altered.
 -- Or 
 alter pluggable database all close;

To drop pluggable database

 drop pluggable database orclpdb2 including datafiles;

You can unplug a PDB from a CDB with this syntax:

alter pluggable database orclpdb2
unplug into
      '/{installationdir}|{backupdir}/orclpdb2pxml';

reference0

reference1