Creating a Source Pluggable Database
Before executing the OMS_Clone_Tenant.sql script, you must complete the following steps.
Procedure
- Create a source Pluggable Database for the tenant.
-
Execute
OMS_DDL.sql and
OMS_SeedData.sql for this Pluggable Database.
This newly created tenant Pluggable Database is considered as a master-copy for creating any further tenants Pluggable Databases. You can call this Pluggable Database "pdb0". Don't store any user data in pdb0 except for the seed data.
-
Navigate to wherever you can find enough available space to store the data files for the new tenant's Pluggable Database.
Usually, the tenant's directory is under /u01/app/oracle/oradata/orcl/ (but this might vary according to the environment).
- You can call the cloned Pluggable Database, which you are trying to create pdb1. Create a subdirectory called pdb1 under your chosen directory in step 3 (for example - under orcl/).
-
Login as SYSDBA and execute the following command:
alter session set container=CDB$ROOT;
-
Close the source (master-copy) Pluggable Database by executing the following command:
alter pluggable database <<source_pdb_name>> close immediate;
Copyright © 2023. Cloud Software Group, Inc. All Rights Reserved.