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, even though we were cloning a PDB remotely. We need to work around it.
Solution to ORA-65016 and ORA-65180
So the solution to ORA-65180 is to use a different path for the cloning. Here are steps:
1. Use 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 PDB
Since we have used a new directory for the PDB, the full path of data files are all different from the source. Oracle knows that it's safe to copy data files from one to another.
SQL> create pluggable database ORCLPDB from ORCLPDB@ORCLPDB_LK file_name_convert=('ORCLPDB','ORCLPDB_1') parallel 16;
Pluggable database created.
We created it.