We can create a pluggable database in an existing multitenant database either using dbca or manually.

Here we will show how to do it manually.

 

STEPS:

Connect to the container database:(ROOT)

 


[oracle@localhost ~]$ sqlplus sys/oracle@cdb1 as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sun Aug 23 10:27:08 2015

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT

 

While creating PDB if you don’t mention FILE_NAME_CONVERT paramter then below error will come

SQL> create pluggable database PROD admin user dbaclass identified by dbaclass;
create pluggable database PROD admin user dbaclass identified by dbaclass
                                                                        *
ERROR at line 1:
ORA-65016: FILE_NAME_CONVERT must be specified

Create PDB:(correct command)

SQL> create pluggable database PROD admin user dbaclass identified by dbaclass FILE_NAME_CONVERT=('/home/oracle/app/oracle/oradata/cdb1/pdbseed','/home/oracle/app/oracle/oradata/cdb1/prod');


Pluggable database created.


SQL> select con_id,name,open_mode from v$Pdbs;

    CON_ID NAME 			  OPEN_MODE
---------- ------------------------------ ----------
	 2 PDB$SEED			  READ ONLY
	 3 ORCL 			  READ WRITE
	 4 PROD 			  MOUNTED
-- Open the PDB
SQL> alter pluggable database PROD open;

Pluggable database altered.



SQL> select con_id,name,open_mode from v$pdbs; 

    CON_ID NAME 			  OPEN_MODE
---------- ------------------------------ ----------
	 2 PDB$SEED			  READ ONLY
	 3 ORCL 			  READ WRITE
	 4 PROD 			  READ WRITE



SQL> alter session set container=PROD;

Session altered.

SQL> show con_name

CON_NAME
------------------------------
PROD
SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
/home/oracle/app/oracle/oradata/cdb1/prod/system01.dbf
/home/oracle/app/oracle/oradata/cdb1/prod/sysaux01.dbf

SQL>