Multitenant with Only One Pluggable Database: An Upgrade Option to Consider

Bookmark and Share

When considering an upgrade to Oracle Database 12c, there is the opportunity to start taking advantage of the new features and the Multitenant option. The decision that needs to be made is whether to create a container database (CDB) or non-container database (non-CDB).

The non-CDB is considered the same as the Oracle 11g database instance and will continue to be available in Oracle 12c. The Oracle Multitenant option does allow for you to create multiple pluggable databases (PDB) in a single CDB, and this option is definitely a path to consider for consolidation of database instances, to name just one reason. However, without the licensing option of Multitenant, a CDB can be created with one PDB, and which is an interesting upgrade path from Oracle 11g to Oracle 12c.

Upgrading an 11g database to 12c can be done in place, which will provide an upgraded non-CDB database instance. Using the database upgrade assistant (DBUA), many of the manual steps are taken care of; this is a standard way to upgrade a database on the same hardware. Once the database is upgraded to 12c, then, using the DBMS_PDB package, the non-CDB can be converted to a PDB. A CDB is needed and can be created in the same Oracle 12c home. This will allow you to plug in the database that is created from the DBMS_PDB package.

One of the non-CDB 12c instances runs the following:



pdb_descr_file => ‘/oradata1/oracle/noncdb.xml’);



Shut down the non-CDB, and then plug in the non-CDB to the already-created container database:

CREATE PLUGGABLE DATABASE pdb01 USING ‘/oradata1/oracle/noncdb.xml’


FILE_NAME_CONVERT = (‘/oradata1/oracle/dbs/’,‘/oradata2/oracle/pdb01’);

As SYSDBA in the ORACLE_HOME of the CDB and newly created PDB run the following:


The PDB can now be opened and should be backed up. More details on this conversion process can be found in the Oracle Database 12c Administrators Guide, but this outlines the basic steps to convert a non-CDB into a PDB.

Another option for upgrading the database to Oracle 12c is to first install Oracle 12c and create a CDB and one PDB. The earlier version of the database can then be exported and imported using Oracle Data Pump into the PDB. This, of course, depends on how big the databases are and on the available downtime, but this approach provides another rollback option and allows for different schemas to be upgraded at different times. Either upgrade approach requires appropriate planning and testing, and the current environment needs to be evaluated with some thought to the direction that the system is needs to go in.

At this point, it might seem that going to the Multitenant architecture complicates the upgrade process or adds some additional steps, but there is value in using the Multitenant features instead of the non-CDB.

In using a single PDB, the features of plugging and unplugging are available. Being able to do this provides another patching option in that you can unplug the PDB and plug it into an already-patched CDB. This can provide a patching scenario with less downtime and stronger testing plans. Along with using the plugging features, there is also cloning from one CDB to another CDB, which works well for testing environments.

The Multitenant architecture does provide another layer of security as well. The permissions for the PDB can be different than the CDB. The CDB can be used for the database engineers and administrators that have access to maintain the instance and overall parameters. The DBAs that administer the application can then be given permissions to only the PDB and not the CDB, and they would not be able to make the instance-level changes. They would be able to perform their tasks at the PDB level and limit some risk of access from the CDB administrators. It does not absolutely restrict someone from creating a user in the PDB, but, using least privilege methodology, only those that need access can be granted access.

Using the Oracle Multitenant features sets up the 12c environment in a way that provides some additional flexibility and supports a move to a pluggable databases setting.

If databases instances are created as CDB with a single PDB, and the requirement comes to consolidate several of these instances together, the move to a Multitenant environment just became a whole lot easier. 

For more information about Oracle Database 12, go here