Replicate data between cloud databases in different regions with VCN peering

Learn to set up and configure Oracle Cloud Infrastructure GoldenGate and Virtual Cloud Network (VCN) peering to replicate data between two Autonomous Databases located in two different regions.

Overview

Oracle Cloud Infrastructure GoldenGate enables you to replicate data in supported OCI databases located in different regions with private endpoints. This example demonstrates how to connect OCI GoldenGate in Phoenix (Region A) to an Autonomous Transaction Processing (ATP) instance in Frankfurt (Region B) with a private endpoint.

Description of vcn-peering.png follows
Description of the illustration vcn-peering.png

Before you begin

You must have the following in order to proceed:

Task 1: Configure networking

  1. In Region A, create a VCN (VCN A) with two regional subnets:
    • Public (10.0.0.0/24)
    • Private (10.0.1.0/24)
    1. On the VCN A Details page, under Resources, click Dynamic Routing Gateway Attachments, and then click Create DRG Attachment.
    2. In the Create DRG Attachment panel, select the DRG you created, and then click Create DRG Attachment.
    3. In the DRG Attachments list, click the DRG name in the Dynamic Routing Gateway column. You're brought to the DRG Details page.
    4. On the DRG Details page, under Resources, click Remote Peering Connection Attachments, and then click Create Remote Peering Connection.
    5. In the Create Remote Peering Connection panel, enter a name, leave the default settings as is, and then click Create Remote Peering Connection. An RPC attachment is automatically added to the DRG and its peering status set to New (not peered).
    6. In the Remote Peering Connections Attachments list, under Remote Peering Connection, click the RPC name.
    7. On the RPC Details page, for OCID, click Copy.
      Note

      You can temporarily paste the OCID to a text editor for later use.
  2. Repeat the previous step in Region B to create a VCN (VCN B) with two regional subnets and DRG:
    • Public (192.168.0.0/24)
    • Private (192.168.1.0/24)
  3. On Region B's RPC Details page, click Establish Connection, select Region A's RPC, and then paste Region A's RPC OCID. The Peer Status is then set to Peered.
  4. On VCN A's Details page, under Resources, click Route Tables, and then click route table for private subnet-<VCN Name>.
  5. Click Add Route Rules.
  6. In the Add Route Rules panel, complete the following fields, and then click Add Route Rules:
    1. Target Type: Dynamic Routing Gateway
    2. Destination CIDR Block: 192.168.1.0/24
  7. On VCN B's Details page, under Resources, click Security Lists, and then click security list for private subnet-<VCN Name>.
  8. Click Add Ingress Rules.
  9. In the Add Ingress Rules dialog, complete the following fields and then click Add Ingress Rules:
    1. Source Type: CIDR
    2. Source CIDR: 10.0.1.0/24
    3. IP Protocol: TCP
    4. Source Port Range: All
    5. Destination Port Range: 1522
      Note

      This is the default port to access Oracle Autonomous Database (ADB) instances.
  10. On VCN B's Details page, under Resources, click Route Tables, and then click route table for private subnet-<VCN Name>.
  11. Click Add Route Rules.
  12. In the Add Route Rules panel, complete the following fields and then click Add Route Rules:
    1. Target Type: Dynamic Routing Gateway
    2. Destination CIDR: 10.0.1.0/24

Task 2: Create a deployment

Ensure that you use VCN A in Region A, which was peered with VCN B in Region B.

To see which regions OCI GoldenGate is available in, see Cloud Data Regions.

Follow the instructions to create a deployment.

Task 4: Create and assign connections

  1. Create connections for the source and target databases.
    Note

    Ensure that:
    • You select 'Dedicated endpoint' for Traffic routing method.
    • Ensure that the domain used by the FQDN provided in the connection string or wallet is being correctly forwarded to the appropriate DNS Resolver using its Rules. See Resolver Rules for more information.
  2. Assign the connections to the deployment created in Task 2.

Task 5: Replicate data

  1. Navigate back to the Deployments page, and then select the deployment you created in Task 2.
  2. On the Deployment details page, click Launch console.
  3. Log in to the OCI GoldenGate deployment console
  4. Add transaction information and a a checkpoint table.
  5. Add and run an Extract.
  6. Add and run a Replicat.

Task 6: Monitor and maintain processes