Oracle pluggable database – FILE_NAME_CONVERT error

I wanted to create a new PDB (pluggable database) using an existing before making a major changes to the original PDB but hit with FILE_NAME_CONVERT error. Creating a pluggable database was supposed to be a simple single statement.

My environment is Oracle Enterprise Linux 7 on VMware Fusion 8 with Oracle 12c environment. I have CDB$ROOT and one Pluggable database (TMPDB1).

15:30:51 [tmel7]sys@CDB$ROOT> show pdbs;
 CON_ID    CON_NAME           OPEN MODE  RESTRICTED
---------- ------------------ ---------- ----------
 2         PDB$SEED           READ ONLY  NO
 3         TMPD1              READ WRITE NO


I ran the following command to create second pluggable database.

SQL> create pluggable database tmpd2 from tmpd1;

got error:

ERROR at line 1:
ORA-65016: FILE_NAME_CONVERT must be specified

Fortunately, the fix is quite simple buy running the following command:

[tmel7]sys@CDB$ROOT>create pluggable database tmpd2 from tmpd1 file_name_convert = ('/u01/app/oracle/oradata/tmdb12/tmpd1','/u01/app/oracle/oradata/tmdb12/tmpd2');

15:32:32 [tmel7]sys@CDB$ROOT> create pluggable database tmpd2 from tmpd1 file_name_convert = ('/u01/app/oracle/oradata/tmdb12/tmpd1','/u01/app/oracle/oradata/tmdb12/tmpd2');
 
Pluggable database created.

15:32:51 [tmel7]sys@CDB$ROOT> show pdbs;
 CON_ID    CON_NAME           OPEN MODE  RESTRICTED
---------- ------------------ ---------- ----------
 2         PDB$SEED           READ ONLY  NO
 3         TMPD1              READ WRITE NO
 4         TMPD2              MOUNTED


Hope someone finds this useful. It saved me considerable amount of time. Enjoy plugging and unplugging “databases”!

Leave a comment