Application Containers
Lab 5: Expansion Beyond Single CDB, and Application Root Replicas
Overview
In this lab we follow the global
expansion of Walt's Malts. In order to comply with
requirements of data sovereignty and latency Walt's Malts has had to expand
into a second CDB, CDB2. (In reality this would be in
a separate server.) Let's get started!
Execution
- Open a terminal window
- Change directory to /u01/HOL/app_containers/
- source the environment. At command prompt execute source cdb1.env
- sqlplus /nolog
- At the SQL prompt execute SQL>@05.Expansion_ARRs.sql
Review of Application Container Lab4:
In this lab, we have worked through the expansion of the application beyond a single CDB. This followed the following stages:
1. Create and Open Application Root Replicas (ARRs):
· wmStore_International
· wmStore_West
2. Create Proxy PDBs for the ARRs.
3. Synchronize the ARRs via their proxies.
4. Create App Seeds for the ARRs.
5. Provision the App PDBs for five new franchises.
6. Add franchise-specific products for new franchises.
It is very important to note that we still only have a single master application definition, despite the application now being deployed across multiple CDBs.
Detailed Steps
Phase 1. Create and Open Application Root Replicas in CDB2
In this section we do the following:
1. Connect to CDB2's Root.
2. Create the CDB$Root-level DB Link.
3. Create and open the Application Root Replicas (ARRs).
Application Root Replicas are required to serve metadata for Application Tenant (Franchise) PDBs in remote CDBs. This is because it is not realistic to assume continuous very low latency access across the internet to a remote Application Root. Next, we create Proxy PDBs for these Application Root Replicas in the Master Application Root. Let's proceed...
Phase 2. Create DB Link and Proxy PDBs for Application Root Replicas in CDB1
In this section we do the following:
1. Connect to wmStore_Master as C##System.
2. Create the Application-Root-level DB Links to CDB2.
3. Create and opened Proxy PDBs for the Application Root Replicas.
Notice the syntax for creating the proxy PDBs, using the phrase "as proxy". Next, we sync the ARRs via their Proxies.
Phase 3. Synchronize the ARRs via their proxies.
The Application Root Replicas are now synchronized with the master. Now we can create Seeds for each ARR.
Phase 4. Create and open the Application Seed PDBs, and sync them with Application wmStore.
· Phase 4a. ARR: wmStore_International
· Phase 4b. ARR: wmStore_West
Now, with extra capacity (in the right geographic location) we are ready to create additional Application PDBs for the new tenants / franchises added during the international expansion of Walt's Malts. The next several steps accomplish this.
Phase 5. Provision the App PDBs for each new Franchise.
In this phase we need to do the following:
1. Connect to the appropriate Application Root Replica (ARR)
2. Create a database link from that ARR to the CDB of the Master Root.
3. Provision Application PDBs for each tenant / franchise as needed.
Phase 6: Create franchise-specific data
Now we'll go to each tenant PDB in turn and add some franchise-specific data. This is for demonstration purposes only. This is not part of the application definition. It merely simulates the creation of data which in the usual course of events would be defined through the application itself. This demo data will be added by the execution of scripts.
Click Here to Go to Lab 6