Tuesday, December 30, 2025

Oracle GoldenGate From On-Premises to OCI DBCS – Part 2: Configuring the Target Environment on OCI

 


Introduction:

This is Part 2 of a three-part blog series on replicating data from an on-premises Oracle Database to OCI using Oracle GoldenGate.

This blog focuses on configuring Oracle GoldenGate on the OCI, including database preparation, GoldenGate setup, and validation.

Related blogs in this series:

Prerequisites

Before configuring Oracle GoldenGate on the target environment in Oracle Cloud Infrastructure (OCI), complete the following prerequisites:

1. Create a Virtual Cloud Network (VCN)

Set up a dedicated VCN in OCI to provide secure network connectivity for Oracle GoldenGate components. In this example, the VCN was created using the Start VCN Wizard, selecting Create VCN with Internet Connectivity. The following IP ranges were used:

  • VCN CIDR Block: 10.0.0.0/16
  • Public Subnet: 10.0.10.0/24
  • Private Subnet: 10.0.11.0/24

2. Provision an Oracle Database Cloud Service (DBCS) instance

Create and configure the target database that will receive the replicated data. In this setup:

  • DB System Name: destoci
  • Shape: VM.Standard.E5.Flex with 2 OCPUs
  • Storage: Logical Volume Manager (LVM) was used instead of ASM since this is a test environment. Note that without ASM, RAC is not supported, so only a single node is created. The minimum selectable storage size is 256 GB.
  • Subnet: Created in the private subnet of the VCN
  • Network Security Groups (NSG): Not configured to simplify setup for the test environment
  • Time Zone: Specified for the VM
  • Database Image: Selected Oracle 19c
  • PDB Name: destpdb

This configuration provides a functional, single-node target database suitable for GoldenGate replication in a test environment.

3. Create an OCI Vault and Master Encryption Key

Set up a Vault in OCI and generate a master encryption key, which will be used in the GoldenGate deployment to securely manage credentials and sensitive configuration data.

In this setup:

  • Before creating the GoldenGate deployment, the Vault and master encryption key must be created to store secrets.
  • Click Create Vault and leave Private Vault unchecked to avoid extra charges.
  • After the Vault is created, go to the Master Encryption Key tab and click Create Key.
  • To avoid costs, choose Protected Mode: Software. If using HSM, the first 20 keys are free.
  • Finally, click Create Key to generate the master encryption key.

This ensures that GoldenGate can securely store sensitive information, such as database credentials, during deployment.

Create a deployment 

In this section, we create an Oracle GoldenGate deployment on Oracle Cloud Infrastructure (OCI). The deployment defines the GoldenGate runtime environment and connects GoldenGate to the required OCI resources, including the Virtual Cloud Network, Vault, and target database. Completing this step prepares the GoldenGate environment for configuring replication components in the subsequent sections.

For creating GoldenGate Deployment, go to Oracle Database >> GoldenGate in OCI.

Go to Deployment >> Create Deployment

On this page, you can change the Oracle GoldenGate version if required.

·         Set the deployment name to OGGDEPAmirTest.

·         Choose Data Replication as the deployment type.

·         Select Oracle Database as the technology since the destination database is DBCS.

·         Because this is a test environment, select Development or Testing for the hardware configuration.

·         Set OCPUs to 1

·         Set GoldenGate instance name to ogginst

By selecting this option, the compute instance for the deployment is created in a private subnet, while a public endpoint is configured to allow access to the Administration Client (GoldenGate Console). Without this configuration, you would need to use a bastion host each time you want to connect to the GoldenGate console.

In the following page. Click Create Secret.

In the new page, create the secret that is required

Click the Create button to create a deployment.


Once the deployment becomes active, click Launch Console to access the Administration Client.


After logging in with the ggadmin user, you should see a page similar to the image below.

Create c##admin user on the destination database (DBCS)

Since my DBCS instance is in a private subnet, I needed to create a private endpoint to connect to it. Then, I connected to the CDB and executed the following commands to create C##ADMIN and grant it the required privileges.

--At CDB level
ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION=TRUE SCOPE=BOTH;
---if the c##ggadmin exists drop it
---DROP USER c##ggadmin CASCADE; 
CREATE USER c##ggadmin IDENTIFIED BY "*************" CONTAINER=all;
ALTER USER c##ggadmin SET CONTAINER_DATA=all CONTAINER=current;
GRANT CREATE SESSION TO c##ggadmin;
GRANT CREATE VIEW TO c##ggadmin;
GRANT CONNECT TO c##ggadmin CONTAINER=all;
GRANT RESOURCE TO c##ggadmin;
GRANT ALTER SYSTEM TO c##ggadmin;
GRANT SELECT ANY DICTIONARY TO c##ggadmin;

exec dbms_goldengate_auth.grant_admin_privilege('C##GGADMIN', CONTAINER => 'all');
exec dbms_goldengate_auth.grant_admin_privilege('C##GGADMIN');
grant unlimited tablespace to c##ggadmin;
grant dba to c##ggadmin;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

---the following grant needed for C##GGADMIN for creating checkpoint table 
GRANT CONNECT, RESOURCE TO C##GGADMIN;
GRANT CREATE TABLE TO C##GGADMIN;
GRANT SELECT ANY TRANSACTION TO C##GGADMIN;
GRANT CONNECT, RESOURCE TO C##GGADMIN CONTAINER=all;
GRANT CREATE TABLE TO C##GGADMIN CONTAINER=all;
GRANT SELECT ANY TRANSACTION TO C##GGADMIN CONTAINER=all;

Now, go to the pluggable database and add supplemental log data here as well

--At pdb level
Alter session set container=DESTPDB;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
GRANT SELECT ANY DICTIONARY TO c##ggadmin;

Conclusion

In this second part of the series, we configured the target environment in Oracle Cloud Infrastructure (OCI) for Oracle GoldenGate replication. We created the required VCN, provisioned the DBCS instance, and set up the OCI Vault with a master encryption key. Finally, we deployed GoldenGate, created the deployment, and verified access to the Administration Client.

With the target environment now fully prepared and validated, the next step is to establish replication between the on-premises source and the OCI target. In Part 3, we will configure the Extract, Data Pump, and Replicat processes to achieve end-to-end data replication.

No comments:

Post a Comment

Oracle GoldenGate From On-Premises to OCI DBCS – Part 3: Connecting On-Premises GoldenGate to Source and OCI GoldenGate to Target Database

Introduction This is Part 3 of a four-part blog series that demonstrates how to replicate data from an on-premises Oracle Database to a d...