Refreshable PDB Switchover in Standard Edition Cloud Service

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=130.61.232.176 – CDB=CDBFRA – PDB=PDBFRA

Server2: IP=158.101.198.85 – CDB=CDBAMS

No alt text provided for this image

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.

No alt text provided for this image

Step 2: on server2, find out the CDB service name.

No alt text provided for this image

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.

No alt text provided for this image

Step 4: on server1 in CDBFRA, grant privileges to SYSOPER and create a database link pointing to CDBAMS on server2.

No alt text provided for this image
No alt text provided for this image

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.

No alt text provided for this image

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.

No alt text provided for this image

Step 8: on server2 in CDBAMS, grant privileges to SYSOPER and create a database link pointing to CDBFRA on server1.

No alt text provided for this image
No alt text provided for this image

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!!!

No alt text provided for this image
No alt text provided for this image

Step 10: on server1 in CDBFRA, insert a second row into the test table.

No alt text provided for this image

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.

No alt text provided for this image

Initiate the switchover from server1 in CDBFRA.

No alt text provided for this image

Now the rules are switched!

No alt text provided for this image
No alt text provided for this image

Insert some values in the test table, this time on server2 in PDBAMS, which just became the active database opened in READ WRITE mode.

No alt text provided for this image

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.

No alt text provided for this image

Initiate the switchover from server2 in CDBAMS.

No alt text provided for this image

Check the rules again!

No alt text provided for this image

Would you like to get notified when the next post is published?