The more databases you clone, the more you learn about the cloning process, and the more challenges you come across. If things always work out as per the documentation, or someone showing you, then you don’t learn as much. That is why, I actually enjoy getting failures in processes from time to time, to learn something new!
That being said, I tried cloning a remote PDB, and the challenge was that the source and target PDB have the same name and same file location.
The environment setup:
Production and test databases are located on separate servers, prod01 and test01. The database version is 19.3.
Production database name is PRODCDB, and has PDB1 as a pluggable database.
Test database name is TESTCDB, and has PDB1 as a pluggable database. There is a database link between test and prod CDB, called prodcdb.
The challenge:
I wanted to refresh PDB1@PRODCDB into PDB1@TESTCDB, by keeping the database name and file names the same.
Let me explain. If the DATA1 tablespace in PDB1@PRODCDB resides here: +DATA/PDB1/data1.dbf on server: prod01, then I wanted the same tablespace’s datafile to reside in the same location on server test01. Because the CDBs are on different servers, prod01 and test01, I thought the file location for the datafiles can be identical.
Let’s find out if this actually works!
Try #1
Because my assumption is that the file names can be identical, I did not specify the FILE_NAME_CONVERT clause during the cloning process. And because my database is not using OMF (Oracle Managed Files), I received the error
ORA-65016: FILE_NAME_CONVERT must be specified: