The multitenant option introduced in Oracle Database 12c allows a single container database (CDB) to host multiple separate pluggable databases (PDB). This article covers the various major operations possible with PDBs.
-
Create a pluggable database
-
Unplug a pluggable database
-
Plugin a pluggable database
-
Clone a pluggable database
-
Delete a pluggable database
-
Configure a pluggable database
With GUI there are 4 tools to perform these tasks
1.) Oracle Universal Installer (OUI)
2.) Database Configuration Assistant (DBCA)
3.) SQL Developer
4.) Cloud Control
Without GUI / CLI Method we can use below 2 tools to perform the same tasks
5.) Manual (SQL*Plus)
6.) DBCA Command Line
-
Oracle Universal Installer (OUI)

OUI allows you to create a CDB during the software installation. The “Typical Install Configuration” screen has a checkbox to indicate the database is a container database. You can optionally create a PDB in this screen also.

The advanced configuration option provides the same ability on the “Database Identifiers” screen.

In both cases the creation of a PDB is optional, so you can create an empty container database and create the pluggable database later.
2. Database Configuration Assistant (DBCA)
DBCA gives similar options to the OUI. The “Creation Mode” page allows you to enter the default installation configuration details directly.

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

The DBCA includes a new option on the opening “Database Operation” screen that allows you to manage the pluggable databases of an existing container database. Select the “Manage Pluggable Databases” option and click the “Next” button.

You can see from the resulting screen what operations are possible with pluggable databases.

The following sections describe some of these options.
Create a Pluggable Database (PDA) using the DBCA
Manage Pluggable Database –> Create a Pluggable Database –> select the container database to house the new pluggable database


Select the “Create a new Pluggable Database” option and click the “Next” button. If you were plugging in a previously unplugged database, you would select the PDB Archive or PDB File Set options to match the format of the files containing the unplugged PDB.

Enter the pluggable database name, database location and admin credentials, then click the “Next” button.

Check the summary information, click the “Finish” button.

Wait while the pluggable database is created. Once complete, click the “OK” button on the message dialog and the “Close” button on the main screen.

The new pluggable database has been created as a clone of the seed database.


Unplug a Pluggable Database (PDB) using the DBCA
Manage Pluggable Databases –> Unplug a Pluggable Database –> select the container database that houses the pluggable database to be unplugged

Select the PDB to unplug, decide whether to use a pluggable database archive or a file set and enter the appropriate location details. Click the “Next” button.

Check the summary information, click the “Finish” button.

Wait while the pluggable database is unplugged. Once complete, click the “OK” button on the message dialog and the “Close” button on the main screen.

The pluggable database has now been unplugged.

Plugin a Pluggable Database (PDB) using the DBCA
Manage Pluggable Databases–>Create a Pluggable Database–>select the container database to house the new pluggable database.

Select the “Create Pluggable Database From PDB Archive” or “Create Pluggable Database using PDB File Set” option and enter the location of the required files. You can browse for the files using the “Browse” button.

Enter the pluggable database name, database location and admin credentials, then click the “Next” button.

Check the summary information, click the “Finish” button.

Wait while the pluggable database is created. Once complete, click the “OK” button on the message dialog and the “Close” button on the main screen.

The pluggable database has been plugged into the container database.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB READ WRITE NO
4 PDB2 READ WRITE NO
5 PDB3 READ WRITE NO
Delete a Pluggable Database (PDB) using the DBCA
Manage Pluggable Databases–>Delete a Pluggable Database–>select the container database that houses the pluggable database

- Check the summary information, click the “Finish” button.
- Wait while the pluggable database is deleted. Once complete, click the “OK” button on the message dialog and the “Close” button on the main screen.
- The pluggable database has been deleted from the container database.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB READ WRITE NO
5 PDB3 READ WRITE NO
Configure a Pluggable Database (PDB) using the DBCA
Manage Pluggable Databases–>Configure a Pluggable Database–>select the container database that houses the pluggable database to be configured

Select the PDB to configure and click the “Next” button.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
5 PDB3 READ WRITE NO
SQL>
SQL> select dbms_xdb_config.gethttpsport () from dual;
DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
0
Select any additional options you would like to configure, then click the “Next” button.

- Check the summary information, click the “Finish” button.
- Wait while the pluggable database is configured. Once complete, click the “OK” button on the message dialog and the “Close” button on the main screen.
The pluggable database has been configured.
SQL> select dbms_xdb_config.gethttpsport () from dual;
DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
5501
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
5 PDB3 READ WRITE NO
3. SQL Developer

Open Menu -> View -> DBA

SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB READ WRITE NO
5 PDB3 READ WRITE NO
Create Pluggable Database

SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB READ WRITE NO
4 SD_PDB MOUNTED
5 PDB3 READ WRITE NO
Clone Pluggable Database

SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB READ WRITE NO
4 SD_PDB READ WRITE NO
5 PDB3 READ WRITE NO
6 NEW_PDB READ WRITE NO
4. Cloud Control
Oracle Cloud Control 12cR3 onward supports pluggable database functionality.
Container database, the “Oracle Database > Control > Open/Close Pluggable Database

The “Oracle Database > Provision > Provision Pluggable Database

5. Manual (SQL*Plus)
- You must be connected to a CDB and the current container must be the root.
- You must have the
CREATE
PLUGGABLE
DATABASE
system privilege.
Create a Pluggable Database (PDB) Manually
To create a new pluggable database from the seed database, all we have to do is tell Oracle where the file should be placed.
There are three methods to tell oracle where the file should be placed.
1. Oracle Managed Files (OMF)
SQL> show parameter db_create_file_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest string
SQL> create pluggable database pdb1 admin user pdb_adm identified by Oracle_4U;
create pluggable database pdb1 admin user pdb_adm identified by Oracle_4U
*
ERROR at line 1:
ORA-65016: FILE_NAME_CONVERT must be specified
SQL> alter system set db_create_file_dest='/u01/app/oracle/oradata';
System altered.
SQL> create pluggable database pdb1 admin user pdb_adm identified by Oracle_4U;
Pluggable database created.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB READ WRITE NO
4 SD_PDB READ WRITE NO
5 PDB3 READ WRITE NO
6 NEW_PDB READ WRITE NO
7 PDB1 MOUNTED
SQL> alter pluggable database pdb1 open;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB READ WRITE NO
4 SD_PDB READ WRITE NO
5 PDB3 READ WRITE NO
6 NEW_PDB READ WRITE NO
7 PDB1 READ WRITE NO
2. OMF location for the new PDB using CREATE_FILE_DEST clause onwards 12.1.0.2
SQL> alter system set db_create_file_dest='';
System altered.
SQL> show parameter db_create_file_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest string
SQL> CREATE PLUGGABLE DATABASE PDB2 ADMIN USER PDB2_ADM IDENTIFIED BY Oracle_4U
2 CREATE_FILE_DEST='/u01/app/oracle/oradata';
Pluggable database created.
SQL> ALTER PLUGGABLE DATABASE PDB2 OPEN;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB READ WRITE NO
4 SD_PDB READ WRITE NO
5 PDB3 READ WRITE NO
6 NEW_PDB READ WRITE NO
7 PDB1 READ WRITE NO
8 PDB2 READ WRITE NO
3. FILE_NAME_CONVERT clause
SQL> CREATE PLUGGABLE DATABASE PDB4 ADMIN USER PDB4_ADM IDENTIFIED BY Oracle_4U
2 FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb/pdbseed/','/u01/app/oracle/oradata/cdb/pdb4/');
Pluggable database created.
OR
SQL> ALTER SESSION SET PDB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/cdb/pdbseed/','/u01/app/oracle/oradata/cdb/pdb5/';
Session altered.
SQL> CREATE PLUGGABLE DATABASE PDB5 ADMIN USER PDB5_ADM IDENTIFIED BY Oracle_4U;
Pluggable database created.
Commands to verify the details of PDBs
COLUMN pdb_name FORMAT A20
SELECT pdb_name, status
FROM dba_pdbs
ORDER BY pdb_name;
COLUMN name FORMAT A20
SELECT name, open_mode
FROM v$pdbs
ORDER BY name;
SHOW PDBS;
The PDBs are created with the status of 'NEW'. They must be opened in READ WRITE mode at least once for the integration of the PDB into the CDB to be complete.
Unplug a Pluggable Database (PDB) Manually
- Before attempting to unplug a PDB, you must make sure it is closed.
- To unplug the database use the ALTER PLUGGABLE DATABASE command with the UNPLUG INTO clause to specify the location of the XML metadata file.
We will Unplug the pluggable database (pdb1) from Container database (cdb)
SQL> ALTER PLUGGABLE DATABASE PDB1 CLOSE IMMEDIATE;
Pluggable database altered.
SQL> ALTER PLUGGABLE DATABASE PDB1 UNPLUG INTO '/u01/app/oracle/oradata/cdb/pdb1/pdb1.xml';
Pluggable database altered.
SQL> SELECT name, open_mode FROM v$pdbs ORDER BY name;
NAME OPEN_MODE
------------------------------ ----------
NEW_PDB READ WRITE
PDB$SEED READ ONLY
PDB1 MOUNTED
PDB2 READ WRITE
SQL> DROP PLUGGABLE DATABASE PDB1 KEEP DATAFILES;
Pluggable database dropped.
SQL> SELECT name, open_mode FROM v$pdbs ORDER BY name;
NAME OPEN_MODE
------------------------------ ----------
NEW_PDB READ WRITE
PDB$SEED READ ONLY
PDB2 READ WRITE
Plugin a Pluggable Database (PDB) Manually
- Plugging in a PDB into the CDB is similar to creating a new PDB.
- First check the PBD is compatible with the CDB by calling the DBMS_PDB.CHECK_PLUG_COMPATIBILITY function,
- passing in the XML metadata file and the name of the PDB
We will plug the PDB1 from Container Database(cdb) into Container Database (cdb2) with name CDB_PDB1. (Plug something from a different charset and convert it.)
SET SERVEROUTPUT ON
DECLARE
l_result BOOLEAN;
BEGIN
l_result := DBMS_PDB.check_plug_compatibility(
pdb_descr_file => '/u01/app/oracle/oradata/cdb/pdb1/pdb1.xml',
pdb_name => 'cdb_pdb1');
IF l_result THEN
DBMS_OUTPUT.PUT_LINE('compatible');
ELSE
DBMS_OUTPUT.PUT_LINE('incompatible');
END IF;
END;
/SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14
incompatible
PL/SQL procedure successfully completed.
If the PDB is not compatible, violations are listed in the
PDB_PLUG_IN_VIOLATIONS view. If the PDB is compatible,
create a new PDB using it as the source. If we were creating
it with a new name we might do something like this.
SQL> select NAME,MESSAGE from PDB_PLUG_IN_VIOLATIONS;
NAME MESSAGE
--------------------------------------------------------------------------------
PDB$SEED Character set mismatch: PDB character set WE8MSWIN1252. CDB character set AL32UTF8.
SQL> select property_name,property_value from database_properties where property_name='NLS_CHARACTERSET';
PROPERTY_NAME PROPERTY_VALUE
--------------------------------------------------------------------------------
NLS_CHARACTERSET WE8MSWIN1252
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string cdb2
SQL> exit
-bash-4.1$ . oraenv
ORACLE_SID = [cdb2] ? cdb
The Oracle base remains unchanged with value /u01/app/oracle
-bash-4.1$ sqlplus / as sysdba
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string cdb
SQL> select property_name,property_value from database_properties where property_name='NLS_CHARACTERSET';
PROPERTY_NAME PROPERTY_VALUE
--------------------------------------------------------------------------------
NLS_CHARACTERSET AL32UTF8
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string cdb2
SQL>
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup restrict
ORACLE instance started.
Total System Global Area 939524096 bytes
Fixed Size 2931088 bytes
Variable Size 348128880 bytes
Database Buffers 583008256 bytes
Redo Buffers 5455872 bytes
Database mounted.
Database opened.
SQL>
SQL> select property_name,property_value from database_properties where property_name='NLS_CHARACTERSET';
PROPERTY_NAME PROPERTY_VALUE
--------------------------------------------------------------------------------
NLS_CHARACTERSET WE8MSWIN1252
SQL> Alter database character set internal_use AL32UTF8;
Database altered.
SQL> Alter database character set AL32UTF8;
Database altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 939524096 bytes
Fixed Size 2931088 bytes
Variable Size 348128880 bytes
Database Buffers 583008256 bytes
Redo Buffers 5455872 bytes
Database mounted.
Database opened.
SQL> SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET';
VALUE$
--------------------------------------------------------------------------------
AL32UTF8
SQL> select property_name,property_value from database_properties where property_name='NLS_CHARACTERSET';
PROPERTY_NAME PROPERTY_VALUE
--------------------------------------------------------------------------------
NLS_CHARACTERSET AL32UTF8
SQL> SET SERVEROUTPUT ON
DECLARE
l_result BOOLEAN;
BEGIN
l_result := DBMS_PDB.check_plug_compatibility(
pdb_descr_file => '/u01/app/oracle/oradata/cdb/pdb1/pdb1.xml',
pdb_name => 'cdb_pdb1');
IF l_result THEN
DBMS_OUTPUT.PUT_LINE('compatible');
ELSE
DBMS_OUTPUT.PUT_LINE('incompatible');
END IF;
END;
/SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14
compatible
PL/SQL procedure successfully completed.
SQL>
SQL> CREATE PLUGGABLE DATABASE CDB_PDB1 USING '/u01/app/oracle/oradata/cdb/pdb1/pdb1.xml' NOCOPY
TEMPFILE REUSE; 2
Pluggable database created.
SQL> ALTER PLUGGABLE DATABASE CDB_PDB1 OPEN READ WRITE;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 CDB_PDB1 READ WRITE NO
Clone a Pluggable Database (PDB) Manually
In Cloning we have to use the any source pluggable database instead of seed PDB, which we have to identify using the FROM
clause.
SQL> ALTER PLUGGABLE DATABASE PDB2 CLOSE;
Pluggable database altered.
SQL> ALTER PLUGGABLE DATABASE PDB2 OPEN READ ONLY;
Pluggable database altered.
SQL> CREATE PLUGGABLE DATABASE PDB3 FROM PDB2
2 create_file_dest='/u01/app/oracle/oradata/cdb/';
Pluggable database created.
SQL> alter pluggable database pdb3 open;
Pluggable database altered.
SQL> alter pluggable database pdb2 close;
Pluggable database altered.
SQL> alter pluggable database pdb2 open read write;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB3 READ WRITE NO
6 NEW_PDB READ WRITE NO
8 PDB2 READ WRITE NO
Clone a Remote PDB or Non-CDB
Coming soon
Clone a Pluggable Database (PDB) Manually (Metadata Only : NO DATA)
-bash-4.1$ export ORACLE_SID=orcl12c
-bash-4.1$
-bash-4.1$ sql
SQL> startup
Database opened.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB10 READ WRITE NO
6 MYPDB4 READ WRITE NO
SQL> CREATE PLUGGABLE DATABASE PDB1 ADMIN USER myadmin identified by
oracle_4U file_name_convert=('pdbseed','pdb1');
Pluggable database created.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB10 READ WRITE NO
4 PDB1 MOUNTED
6 MYPDB4 READ WRITE NO
SQL>
SQL> alter pluggable database pdb1 open;
Pluggable database altered.
SQL> alter session set container=pdb1;
Session altered.
SQL> show con_name
CON_NAME
------------------------------
PDB1
SQL> create tablespace users
datafile '/u01/app/oracle/oradata/orcl12c/pdb1/users.dbf' size 19m
autoextend on;
Tablespace created.
SQL> alter database default tablespace users;
Database altered.
SQL> grant unlimited tablespace to myadmin;
Grant succeeded.
SQL> create table myadmin.test as select * from dba_objects;
Table created.
SQL> select count(*) from myadmin.test;
COUNT(*)
----------
90924
SQL> alter session set container=cdb$root;
Session altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB10 READ WRITE NO
4 PDB1 READ WRITE NO
6 MYPDB4 READ WRITE NO
SQL> create pluggable database pdb2 from pdb1
file_name_convert=('pdb1','pdb2') no data
Pluggable database created.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB10 READ WRITE NO
4 PDB1 READ WRITE NO
5 PDB2 MOUNTED
6 MYPDB4 READ WRITE NO
SQL> alter pluggable database pdb2 open;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 MYPDB10 READ WRITE NO
4 PDB1 READ WRITE NO
5 PDB2 READ WRITE NO
6 MYPDB4 READ WRITE NO
SQL> alter session set container=pdb2;
Session altered.
SQL> show con_name
CON_NAME
------------------------------
PDB2
SQL> select count(*) from myadmin.test;
COUNT(*)
----------
0
SQL> exit
6. DBCA Command Line
REFERENCE
=========
-bash-4.1$ dbca -createdatabase -help
Create a database by specifying the following parameters:
-createDatabase
-templateName <name of an existing template in default location or the complete template path>
[-cloneTemplate]
-gdbName <global database name>
[-ignorePreReqs] <ignore prerequisite checks for current operation>
[-sid <database system identifier>]
[-createAsContainerDatabase <true|false>]
[-numberOfPDBs <Number of Pluggable databases to be created, default is 0>]
[-pdbName <New Pluggable Database Name>]
[-pdbAdminPassword <PDB Administrator user Password, required only when creating new PDB>]
[-sysPassword <SYS user password>]
[-systemPassword <SYSTEM user password>]
[-emConfiguration <DBEXPRESS|CENTRAL|BOTH|NONE>]
-dbsnmpPassword <DBSNMP user password>
[-omsHost <EM management server host name>
-omsPort <EM management server port number>
-emUser <EM Admin username to add or modify targets>
-emPassword <EM Admin user password>
-emExpressPort <EM Database Express port number>]]
[-dvConfiguration <true | false Specify "true" to configure and enable Database Vault
-dvUserName <Specify Database Vault Owner user name>
-dvUserPassword <Specify Database Vault Owner password>
-dvAccountManagerName <Specify separate Database Vault Account Manager >
-dvAccountManagerPassword <Specify Database Vault Account Manager password>]
[-olsConfiguration <true | false Specify "true" to configure and enable Oracle Label Security >
[-datafileDestination <destination directory for all database files.> |
-datafileNames <a text file containing database objects such as controlfiles, tablespaces, redo log files and spfile to their corresponding raw device file names mappings in name=value format.>]
[-redoLogFileSize <size of each redo log file in megabytes>]
[-recoveryAreaDestination <destination directory for all recovery files. Specify "NONE" for disabling Fast Recovery Area.>]
[-datafileJarLocation <location of the data file jar, used only for clone database creation>]
[-storageType < FS | ASM >
[-asmsnmpPassword <ASMSNMP password for ASM monitoring>]
-diskGroupName <database area disk group name>
-recoveryGroupName <recovery area disk group name>
[-characterSet <character set for the database>]
[-nationalCharacterSet <national character set for the database>]
[-registerWithDirService <true | false>
-dirServiceUserName <user name for directory service>
-dirServicePassword <password for directory service >
-walletPassword <password for database wallet >]
[-listeners <list of listeners to configure the database with>]
[-variablesFile <file name for the variable-value pair for variables in the template>]]
[-variables <comma separated list of name=value pairs>]
[-initParams <comma separated list of name=value pairs>]
[-sampleSchema <true | false> ]
[-memoryPercentage <percentage of physical memory for Oracle>]
[-automaticMemoryManagement <true | false> ]
[-totalMemory <memory allocated for Oracle in MB>]
[-databaseType <MULTIPURPOSE|DATA_WAREHOUSING|OLTP>]]
Create the container database without PDBs
-bash-4.1$ dbca -silent -createdatabase -createascontainerdatabase true
-sid cdb2 -gdbname cdb2 -syspassword oracle_4U -systempassword oracle_4U
-templatename General_Purpose.dbc
-datafiledestination /u01/app/oracle/oradata/
-emconfiguration DBEXPRESS -memorypercentage 20
-storagetype fs -databasetype oltp
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
46% complete
47% complete
52% complete
57% complete
58% complete
59% complete
62% complete
Completing Database Creation
66% complete
70% complete
74% complete
85% complete
89% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/cdb2/cdb20.log" for further details.
-bash-4.1$
-bash-4.1$ . oraenv
ORACLE_SID = [cdb] ? cdb2
The Oracle base remains unchanged with value /u01/app/oracle
-bash-4.1$ sqlplus / as sysdba
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string cdb2
Create the container database with PDBs
-bash-4.1$ ./dbca -silent -createdatabase -gdbname cdb -sid cdb -createascontain erdatabase true -numberofpdbs 2 -pdbname mydb -pdbadminpassword oracle_4U -syspa ssword oracle_4U -systempassword oracle_4U -templatename General_Purpose.dbc -da tafiledestination /u01/app/oracle/oradata/ -emconfiguration dbexpress -character set al32utf8 -memorypercentage 20
Note: Monitor the progress using below command.
tail -100f /u01/app/oracle/cfgtoollogs/dbca/cdb/trace.log
Thank you for visiting our blog…