How to Resolve ORA-65016: FILE_NAME_CONVERT

  • by

ORA-65016 and ORA-65180

Tried to clone a remote PDB with the same name and path and got ORA-65016 like this.

SQL> create pluggable database ORCLPDB from ORCLPDB@ORCLPDB_LK parallel 16;
create pluggable database ORCLPDB from ORCLPDB@ORCLPDB_LK parallel 16
                                                                    *
ERROR at line 1:
ORA-65016: FILE_NAME_CONVERT must be specified

ORA-65016 means that the database don't know where to map target data files during cloning, which is usually defined by FILE_NAME_CONVERT.

OK, if it's necessary to use FILE_NAME_CONVERT, let's add it to the statement, even though it looks a little odd.

SQL> create pluggable database ORCLPDB from ORCLPDB@ORCLPDB_LK file_name_convert=('ORCLPDB','ORCLPDB') parallel 16;
create pluggable database ORCLPDB from ORCLPDB@ORCLPDB_LK file_name_convert=('ORCLPDB','ORCLPDB') parallel 16
*
ERROR at line 1:
ORA-65180: duplicate file name encountered -
+DATA/ORCLCDB/ORCLPDB/system01.dbf

OK, it seems that it does not accept cloning a PDB with the same path and name. We need to work around it.

Solution to ORA-65016 and ORA-65180

So the solution to ORA-65180 is to use a different name and path for the cloning.

1. Create a Different Path

We create a new directory for the new path.

[grid@primary01 grid]$ asmcmd mkdir +DATA/ORCLCDB/ORCLPDB_1

As I said, we have to explicitly create a directory for a non-OMF database, otherwise, we'll get ORA-15173 when creating a PDB.

2. Create a Different PDB

We use a new name for the PDB.

SQL> create pluggable database ORCLPDB_1 from ORCLPDB@ORCLPDB_LK file_name_convert=('ORCLPDB','ORCLPDB_1') parallel 16;

Pluggable database created.

We're done.

Leave a Reply

Your email address will not be published. Required fields are marked *