Oracle Database Standard Edition in the Cloud offers additional features including:
- All versions: Transparent Data Encryption, which is available only for Enterprise Edition on-prem.
- 18c onwards: Refreshable PDB Switchover, which is available only for EE on Engineered Systems (Exadata and ODA) on-prem.
Additionally, in the Cloud you benefit from Automatic Backups, one-click Restore, one-click CPU up/down Scaling, and Simplified Patching.
This blog post describes a detailed instruction how to configure Refreshable PDB Switchover in SE Cloud Service across regions. It is the same procedure if you would like to keep your clone PDB in the same region, but on different system in a second Availability Domain or Fault Domain.
Step 1: create two DB Systems. While creation you choose your CDB and PDB names. After creation, you will find the server IP address on the “Nodes” details page. We will proceed with the following example configuration:
Server1: IP=220.127.116.11 – CDB=CDBFRA – PDB=PDBFRA
Server2: IP=18.104.22.168 – CDB=CDBAMS
In the following steps, screen shots of commands to be ran on server 1 will be with black backgroud while screen shots of commands to be ran on server 2 with gray background.
All commands needed can be downloaded HERE, so you don’t need to re-write them again.
Step 2: on server2, find out the CDB service name.
Step 3: on server1, add a TNS alias in tnsnames.ora pointing to CDBAMS on server2 using the IP address from step 1 and the service name from step 2.
Step 4: on server1 in CDBFRA, grant privileges to SYSOPER and create a database link pointing to CDBAMS on server2.
Step 5: on server1 in PDBFRA. Create a test table and insert one row into it.
Step 6: on server1, find out the CDB service name.
Step 7: on server2, add a TNS alias in tnsnames.ora pointing to CDBFRA on server1 using the IP address from step 1 and the service name from step 6.
Step 8: on server2 in CDBAMS, grant privileges to SYSOPER and create a database link pointing to CDBFRA on server1.
Step 9: it is time for the BIG MOMENT. On server2, create the PDB refreshable clone. The keystore password is the same as SYS password you entered while creating the database system.
Open it in READ ONLY mode and verify that the test table exists containing one row. Close the PDB again.
Now we have a refreshable clone!!!
Step 10: on server1 in CDBFRA, insert a second row into the test table.
Step 11: WAIT at least one minute for the changes from step 10 to be synchronized. On server2 in PDBAMS, query the changes.
Step 12: it is time for the REAL BIG MOMENT!
On server2, open the PDBAMS in READ ONLY mode.
Initiate the switchover from server1 in CDBFRA.
Now the rules are switched!
Insert some values in the test table, this time on server2 in PDBAMS, which just became the active database opened in READ WRITE mode.
Wait a minute for the changes to be synchronized and check the data on server1 in PDBFRA.
Step 13: as a last step, we could now switch the rules back.
On server1, open the PDBFRA in READ ONLY mode.
Initiate the switchover from server2 in CDBAMS.
Check the rules again!