You must prepare the script
OMS_Clone_Tenant.sql before executing it.
Procedure
Replace
<<source_pdb_name>> with the actual source Pluggable Database name. If you followed the naming convention suggested in
Creating a Source Pluggable Database, it would be
pdb0.
Replace
<<path_to_new_pdb_directory>> with the actual directory path to the new directory that you created to store the cloned Pluggable Database's data files. If you used the same directory and naming convention in
Creating a Source Pluggable Database, this would be
/u01/app/oracle/oradata/orcl/pdb1.
Replace
<<new_pdb_name>> with the new pdb name. If you followed the naming convention suggested in
Creating a Source Pluggable Database, it would be
pdb1.
Execute the
OMS_Clone_Tenant.sql script as SYSDBA.
The new tenant is created with all the users, tables, and data, which were existing in the original tenant.
Update the tnsnames.ora file by adding a new listener entry for the newly created Pluggable Database (pdb1).
Now you are ready to use the newly created container (pdb1) as a tenant database. Use the service name provided for the new Pluggable Database to connect from the
ConfigValues_OMS.xml file.