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 126.96.36.199.0 Production on Mon Aug 26 15:29:49 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Oracle Database 12c Enterprise Edition Release 188.8.131.52.0 – 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.
EPM applications help measure the business performance. This post will help you choose the best EPM solutions for your organization’s needs and objectives.