Oracle has introduced new Multitenant Option from Oracle 12cR1 and this option enables an Oracle database to function as a container database(CDB). A CDB includes zero, one, or many pluggable databases. A PDB is a portable collection of schemas, schema objects, and nonschema objects that appears to an Oracle Net client as a non-CDB. All Oracle databases before Oracle Database 12c were non-CDBs.
Refer here for more details on Oracle Multitenant option.
In this article I will demonstrate an overview of creating a CDB and PDB database using DBCA.
Refer here to Create Container database (CDB) in silent mode
Here I am using VNC viewer for database creation in graphical mode. Refer the link to Install and configure VNC Server on Linux 7
Create CDB using DBCA
![](http://15.206.169.97/wp-content/uploads/2021/01/image.png)
Select Create a database and click next
![](http://15.206.169.97/wp-content/uploads/2021/01/image-3.png)
Select Advanced Configuration
![](http://15.206.169.97/wp-content/uploads/2021/01/image-1.png)
Select Oracle Single instance database, leave the template section with default one selected and click on Next
![](http://15.206.169.97/wp-content/uploads/2021/01/image-4.png)
Provide the details as per your requirement,
Global database name:
SID:
Select Create as Container datbase
Number of PDBs:
PDB Name:
![](http://15.206.169.97/wp-content/uploads/2021/01/image-20.png)
Provide the Datafile storage type as per your environment
![](http://15.206.169.97/wp-content/uploads/2021/01/image-7.png)
Specify the Recovery files storage type, Flash Recover Area and Size and click Next
![](http://15.206.169.97/wp-content/uploads/2021/01/image-8.png)
Select the listener if already have one or Create a new one as below
![](http://15.206.169.97/wp-content/uploads/2021/01/image-9.png)
Choose Automatic memory management and provide the Memory Target Size,
![](http://15.206.169.97/wp-content/uploads/2021/01/image-11.png)
Provide the processes Count
![](http://15.206.169.97/wp-content/uploads/2021/01/image-15.png)
Choose the Character set and click on Next
![](http://15.206.169.97/wp-content/uploads/2021/01/image-13.png)
Select Configure Enterprise management option and provide the EM express port. If EM cloud control is in place, provided the details. Then click on Next
![](http://15.206.169.97/wp-content/uploads/2021/01/image-12.png)
Provide the Password and click on Next
![](http://15.206.169.97/wp-content/uploads/2021/01/image-14.png)
Select Create database and click next
![](http://15.206.169.97/wp-content/uploads/2021/01/image-18.png)
Verify the parameters and click on Finish to start the DB creation.
![](http://15.206.169.97/wp-content/uploads/2021/01/image-22.png)
Database has been successfully created, click on close
![](http://15.206.169.97/wp-content/uploads/2021/01/image-21.png)
Connect to database and verify,
[oracle@cdb12c /]$ . oraenv
ORACLE_SID = [cdbdev] ?
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@cdb12c /]$
[oracle@cdb12c /]$ sqlplus "/as sysdba"
SQL*Plus: Release 12.2.0.1.0 Production on Sun Jan 17 20:47:35 2021
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> select name, open_mode, cdb from v$database;
NAME OPEN_MODE CDB
--------- -------------------- ---
CDBDEV READ WRITE YES
SQL>
Check the PDB stauts
SQL> col name for a15
SQL> select name, open_mode from v$pdbs;
NAME OPEN_MODE
--------------- ----------
PDB$SEED READ ONLY
PDB1 READ WRITE
SQL> select name, pdb, network_name from v$services;
NAME PDB NETWORK_NAME
-------------------- --------------- -------------------------
pdb1.localdomain PDB1 pdb1.localdomain
SYS$BACKGROUND CDB$ROOT
SYS$USERS CDB$ROOT
cdbdevXDB CDB$ROOT cdbdevXDB
cdbdev.localdomain CDB$ROOT cdbdev.localdomain
SQL>
Container database CDBDEV and Pluggable database PDB1 created successfully.
Hope this helps…