The What’s and the How-to’s of Container Databases

By | In Blog | June 08th, 2016

Oracle Database 12c introduced a new feature called “multitenant.” The multitenant feature provides the ability for a single instance to manage multiple databases. The multitenant architecture enables an Oracle database to function as a multitenant container database (CDB).

The multitenant architecture comprises the following:

  • “Multitenant” Database Instance: This is a term used to distinguish between a database instance that supports multitenant database and one that does not.
  • Container Database (CDB): This is the database that is created when that database supports Oracle’s multitenant option. It’s also called the ROOT container and is the CDB$ROOT within the data dictionary views of the CDB.
  • Root Container Database: This is created automatically when you create a multitenant database. The root container contains the data dictionary for the CDB.
  • Pluggable Database (PDB): These are the databases that are stored within the CDB. A PDB is a portable collection of schemas, schema objects, and nonschema objects that appears to an Oracle Net client as a non-CDB.

Note: A Container Database (CDB) comprises zero, one, or many customer-created pluggable databases. All Oracle databases before Oracle Database 12c were non-CDBs.

Oracle Multitenant offers the ability to have up to 252 PDBs per multitenant container database. The multitenant architecture with one user-created pluggable database (single tenant) is available in all editions without the multitenant option.

The benefits of multitenant feature

Below is the outline of the benefits of the multitenant feature:

  • Very fast provisioning of a new database or of a copy of an existing database. Very fast redeployment, by unplug and plug, of an existing database to a new platform.
  • Patch or upgrade the Oracle Database version for many databases quickly, and for the human cost of doing it once. Patch or upgrade by unplugging a PDB and plugging it into a different CDB at a later version.
  • Consolidate many more PDBs onto a single platform than you can with monolithic databases.

How to create/set up container database

There are three ways to create container database, as follows:

  •       Database Configuration Assistant (DBCA)
  •       Oracle Universal Installer (OUI)
  •       Manual Creation

Your first choice for creating a CDB should always be the DBCA as that’s the best way to create CDB either during or after software installation. Hence, in this blog post, we will discuss the DBCA method only.

Database Configuration Assistant (DBCA)

The DBCA enables you to create a container database (CDB) either during or after the software installation. The “Creation Mode” page allows you to enter the default installation configuration details directly. You can optionally create a single pluggable database (PDB) in this screen also.

Image source:

If you chose the “Advanced Mode” option, you can create a CDB and multiple PBDs in one go.

Note: The Oracle Universal Installer (OUI) is almost similar to the DBCA method. More details on OUI and Manual Creation methods can be found here.

What does it mean to me? Do I have to login differently?

No, connecting to the root of a container database is the same as that of any previous database instance. The usual way has been using OS Authentication on the database server as follows:

$ export ORACLE_SID=cdb1$ sqlplus / as sysdba 

SQL*Plus: Release Production on Mon Aug 26 15:29:49 2013 

Copyright (c) 1982, 2013, Oracle. All rights reserved. 

Connected to:

Oracle Database 12c Enterprise Edition Release – 64bit ProductionWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing options 


You can connect to other common users in similar way as follows:

SQL> CONN system/password



Do I have to perform backups in a different manner?

No, the backup of a Container Database (CDB) is essentially the same as a non-container database. What you should know is that when you perform a full backup of the CDB you are backing up all PDBs.

Does OEM monitor it like it is a physical database?

Yes, you can use Oracle Enterprise Manager (OEM) to manage and monitor CDB storage and schema objects. With Oracle Enterprise Manager you can:

  • View database storage objects, such as tablespaces, and schema objects, such as tables, across the CDB. You can also view objects belonging to the CDB$ROOT container.
  • View and manage database storage and schema objects at the container level.
  • Use storage metrics to gather data across the CDB and generate Enterprise Manager incidents (alerts) at the container level.
  • Run Storage and Undo Advisors for the CDB and view related storage advice.
  • Support configuration metric collection for CDB/PDB.

Datavail can help you set up a container database to suit your needs. Contact us today. With nearly 500 DBAs worldwide, Datavail is the largest database services provider in North America. With 24×7 managed database services, including database design, architecture and staffing, Datavail can support your organization as it works with MySQL, regardless of the build you ultimately select.

Contact Us
Vice President and Practice Leader of Oracle Services, Datavail
Patrick’s background includes 15 years of IT experience specializing in database architecture, database administration and performance tuning. He has managed the infrastructure for enterprise database operations of over 300 databases, including several ranging from 10 gigabytes to 80 terabytes. Patrick has designed and developed comprehensive database administration solutions for high performance, reliability and integrity, including backup and recovery, fault-tolerant connectivity, operations and performance monitoring, reporting, automated storage management, BCDR, SOX compliance and Co-Sourcing. A former manager at Level 3 Communications, Patrick has valuable experience in database architecture and corporate data warehousing. Patrick’s hobbies include skiing, Crossfit, hockey and playing with his kids.

Leave a Reply

Your email address will not be published.
Required fields are marked (*).