Demand and environment
The cloned environment 55.34.4.153 RAC architecture, PDB: HKUATBK
Clone destination: 55.14.64.79 single node
Steps
1. The tns string created by the destination database to the clone source
LINK2CD = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 55.34.4.153)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORA19RAC) ) ) |
Note: The service name is the service name at the CDB level |
2. Create a dblink link for the destination library
create public database link LINK2CD connect to SYSTEM identified by SYSTEM using 'LINK2CD'; /* Verify DBLINK*/ select name from v$containers@LINK2CD; |
3. Grant permissions to the target database user SYSTEM
grant create session, create pluggable database to SYSTEM container=all; note: When authorizing, ensure that the cloned PDB is in the read write state, so that the above statement modifies all PDBs (because it is a public user) |
4. Clone
create pluggable database HKUATBK from HKUATBK@LINK2CD file_name_convert=('+DATADG','+DATADG');
Command analysis:
HKUATBK: The PDB that the destination needs to create (it can have a different name from the source PDB);
HKUATBK@LINK2CD: clone the source PDB and point to the source DB LINK;
file_name_convert: file name conversion during cloning;
Error resolution
The above error analysis and solutions:
Analysis: Using OMF under RAC, PDB's DATAFILE and TEMPFILE are stored in different directories, so the TEMPFILE directory needs to be created separately, and file_name_convert only converts class DATAFILE
Solution: Create a corresponding TEMPFILE directory in the corresponding directory of the target library;
other instructions:
The official steps may also involve:
1. Database compatibility check;
2. Operating system check of the small and small end;
Etc., since the author is a clone between two same OS and the same database version, there should be no such problem, so I just ignore it.