We can clone a pluggable database from existing PDB ( PROD), residing on the same container.
1. First start the PDB in read only , which needs to be cloned.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
ORCL READ WRITE
PROD READ WRITE
SQL> alter session set container=PROD;
Session altered.
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> show con_name
CON_NAME
------------------------------
PROD
SQL> shutdown immediate;
Pluggable Database closed.
SQL> startup open read only
Pluggable Database opened.
2. Connect to the container and clone the pluggable:
-- connect to container CDB1
SQL> conn sys/oracle@cdb1 as sysdba
Connected.
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
-- Clone pluggable
SQL> create pluggable database PROD_CL from PROD FILE_NAME_CONVERT=('/home/oracle/app/oracle/oradata/cdb1/prod','/home/oracle/app/oracle/oradata/cdb1/PROD_CL');
Pluggable database created.
3. Now make the existing PDB ( PROD) from read only to read write:
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
ORCL READ WRITE
PROD READ ONLY
PROD_CL MOUNTED
SQL> alter session set CONTAINER=PROD;
Session altered.
SQL> shutdown immediate;
Pluggable Database closed.
SQL> startup
Pluggable Database opened.
SQL> show con_name
4. Start the new cloned PDB( PROD_CL)
SQL> alter session set container=PROD_CL;
Session altered.
SQL> startup
Pluggable Database opened.
SQL> conn sys/oracle@cdb1 as sysdba
Connected.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
ORCL READ WRITE
PROD READ WRITE
PROD_CL READ WRITE