Select Page

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

Patrick Gates | | June 8, 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: Oracle-Base.com

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 12.1.0.1.0 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 12.1.0.1.0 – 64bit ProductionWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing options 

SQL>

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

SQL> CONN system/password

Connected.

SQL>

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.

12c Upgrade Bug with SQL Tuning Advisor

This blog post outlines steps to take on Oracle upgrade 11.2 to 12.1 if you’re having performance problems. Oracle offers a patch and work around to BUG 20540751.

Megan Elphingstone | March 22, 2017

Oracle EPM Cloud Vs. On-Premises: What’s the Difference?

EPM applications help measure the business performance. This post will help you choose the best EPM solutions for your organization’s needs and objectives.

Bobby Ellis | April 10, 2018

Tips for Upgrading From SQL 2008 to 2012 or 2014

It’s 2015 and you can now establish totally respectable MS SQL DBA credibility just by mentioning you have been in the game since SQL Server version 9. You may even get the same gasps of shock from some colleagues that used to be reserved for the version 6 veterans.

Andy McDermid | April 8, 2015

Work with Us

Let’s have a conversation about what you need to succeed and how we can help get you there.

CONTACT US

Work for Us

Where do you want to take your career? Explore exciting opportunities to join our team.

EXPLORE JOBS