Friday, January 2, 2026

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 database running on Oracle Cloud Infrastructure (OCI) using Oracle GoldenGate.

In this blog, we focus on connecting Oracle GoldenGate to the source and target databases. Specifically, we configure the on-premises GoldenGate deployment to connect to the source database and the OCI GoldenGate deployment to connect to the target OCI DBCS database. These connections are critical prerequisites before enabling data movement between environments.

Related blogs in this series:

Create connections in Goldengate deployment to the dbcs (on dest)

To support Oracle GoldenGate replication, we need to create two database connections in the GoldenGate deployment: one to the CDB and one to the PDB. The CDB connection is required for the Extract process, while the PDB connection is required for the Replicat process. Both connections are essential for enabling end-to-end replication to the OCI DBCS target.

Step 1: Creating a connection to CDB

Go to the OCI Goldengate and connection, click Create Connection


Select the type as an Oracle database. Since this is the connection to CDB, leave the Pluggable database empty 


For the database connection user, we use C##GGADMIN. A new secret must be created for this user because the previously created secret was associated with the GGADMIN user used for the GoldenGate deployment, not for database connectivity.

I reused the same OCI Vault and master encryption key created earlier to store this new secret securely, then click Create.

I didn’t use the wallet secret. I simply selected Dedicated Connection and clicked Create.


Step 2: Creating a connection to CDB 

Go to the OCI Goldengate and connection, click Create Connection

Set the connection name to C2DBCS-PDB. For the user, we use C##GGADMIN. 


For the secret, I reused the secret that was created for the CDB connection, since C##GGADMIN uses the same password for both the CDB and PDB. Then, select Dedicated Endpoint and click Create.

These are two connection that I have created.


Step 3: Create a Dynamic Group for your GoldenGate Deployment

If you don’t have a Dynamic Group and only have a regular IAM group (such as Administrators), that is not sufficient for your Oracle GoldenGate deployment to access secrets from OCI Vault using resource principals. 
Therefore, I have created the following dynamic group.

Step 4: Create the IAM Policy in the Right Compartment

Navigate to Identity & Security > Policies in the OCI Console. Select the compartment where your Vault secret resides, and then create the required policy.

Step 5: Assign connections to the deployment

On the deployment details page, from the Assigned connections tab, click Assigned Connections.


Then select the CDB connection we created before 

Now, we should assign the PDB connection as well. Again, click on assign connection, and this time select the PDB connection we created before.


Now, our connections have been created

NOTE: Add the appropriate ingress rule in the VCN’s private subnet to allow the GoldenGate deployment to access the DBCS database, as shown in the following image. 

Now, if we test the connection to CDB and PDB, we can see that they are working successfully.


Now, if you go to the OCI GoldenGate Console, you can see that this credential has been added. If I click test connection, I can connect to the database in OCI Goldengate Console, and the connection test changes to the Lock.

Create Credentials (Connections) to the Source CDB and PDB in the On-Premises GoldenGate Deployment.

Go to the On-Premises GoldenGate Administrative Service, navigate to Configuration, click +, and leave the Credential Domain empty (it will default to Oracle GoldenGate).

Step 1: Create the connection to the source CDB


Use the easy connect for the user I tested here c##ggadmin@192.168.56.10:1521/src.amir.net 


Test the connection to ensure it is working. The icon changes to a lock, indicating that the connection is working correctly.


Step 2: Create the connection to the source PDB

Go to the On-Premises GoldenGate Administrative Service, navigate to Configuration, click +, and leave the Credential Domain empty (it will default to Oracle GoldenGate). Use the easy connect for the user. I tested here c##ggadmin@192.168.56.10:1521/pdb1.amir.net 

Step 3: Add schema TRANDATA at the pdb level

We need to add the TRANDATA schema. In my case, I used the HR schema in the PDB, so the format should include both the PDB name and the schema name, like pdb1.hr. First, I checked whether it already exists by searching for it.

It returned nothing, so I added it by clicking the + button next to the TRANDATA information.

After searching again, the entry is now visible.


Conclusion

In this third part of the series, we successfully connected the on-premises Oracle GoldenGate deployment to the source database and the OCI GoldenGate deployment to the target database. By validating database connectivity and credentials on both sides, we ensured that each GoldenGate environment is properly integrated with its respective database.

With database connectivity now in place, the final step is to enable communication between the on-premises and OCI GoldenGate deployments and configure the replication processes. In Part 4, we will use NGINX to establish secure connectivity between environments and create the Extract and Replicat processes to complete the end-to-end replication setup.

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