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:
- Part 1:
Configuring the Source Environment
- Part 2:
Configuring the Target Environment on OCI
- Part 4: Connecting On-Premises GoldenGate to OCI using NGINX and Creating Extract & Replicat
Create connections in Goldengate deployment to the dbcs (on dest)
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
Set the connection name to C2DBCS-PDB. For the user, we use C##GGADMIN.
Step 3: Create a Dynamic Group for your GoldenGate Deployment
Step 5: Assign connections to the deployment
On the deployment details page, from the Assigned connections tab,
click Assigned Connections.
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.
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
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, likepdb1.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