Oracle GoldenGate Replicating On-Prem Oracle DB to Google Cloud


πŸ”Ή Looking to replicate your on-prem Oracle database to Google Cloud with real-time changes? Oracle GoldenGate (OGG) provides a seamless solution for heterogeneous replication with minimal latency.

πŸ‘‰ In this post, I’ll walk you through a step-by-step process to configure Oracle GoldenGate replication from an On-Premises Oracle database to Google Cloud (Cloud SQL / Bare Metal DB).

πŸ’‘ Why Oracle GoldenGate for this setup?
βœ… Real-time data replication
βœ… Zero downtime migration
βœ… Supports heterogeneous databases
βœ… High availability & scalability

πŸ”Ή Step 1: Prepare Source Database (On-Prem Oracle DB)
βœ… Enable supplemental logging

ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE FORCE LOGGING;
βœ… Grant required permissions

GRANT CREATE SESSION, ALTER SYSTEM, SELECT ANY DICTIONARY TO ogg_user;
βœ… Add extract user

CREATE USER ogg_user IDENTIFIED BY “YourStrongPassword”;
GRANT CONNECT, RESOURCE TO ogg_user;
πŸ”Ή Step 2: Install & Configure Oracle GoldenGate on On-Prem Server
βœ… Configure Extract Process

cd $OGG_HOME
./ggsci

ADD EXTRACT ext1, TRANLOG, BEGIN NOW
ADD EXTTRAIL ./dirdat/lt, EXTRACT ext1
βœ… Edit Extract Parameter File

EDIT PARAMS ext1

EXTRACT ext1
USERID ogg_user, PASSWORD YourStrongPassword
TRANLOGOPTIONS DBLOGREADER
EXTTRAIL ./dirdat/lt
TABLE schema_name.*;
βœ… Start Extract

START EXTRACT ext1
πŸ”Ή Step 3: Set up Google Cloud (Cloud SQL / Bare Metal DB)
βœ”οΈ Cloud SQL: Enable connectivity & create an instance
βœ”οΈ Bare Metal DB: Install Oracle and configure networking

βœ… Create target schema & user

CREATE USER ogg_target IDENTIFIED BY “TargetPassword”;
GRANT CONNECT, RESOURCE TO ogg_target;
πŸ”Ή Step 4: Configure Replicat Process on Google Cloud
βœ… Configure Replicat

ADD REPLICAT rep1, EXTTRAIL ./dirdat/lt
βœ… Edit Replicat Parameter File

EDIT PARAMS rep1

REPLICAT rep1

USERID ogg_target, PASSWORD TargetPassword

ASSUMETARGETDEFS

MAP schema_name.* , TARGET schema_name.*;
βœ… Start Replicat

START REPLICAT rep1
πŸ”Ή Step 5: Monitor & Validate
βœ… Check Extract & Replicat Status

INFO ALL
βœ… Validate Data Consistency

SELECT COUNT() FROM source_table; SELECT COUNT() FROM target_table@ggcloud;
πŸ”Ή πŸ’‘ Key Takeaways:
βœ” Oracle GoldenGate ensures real-time replication
βœ” Works seamlessly with Google Cloud SQL or Bare Metal DB
βœ” Ideal for hybrid cloud migration & disaster recovery

πŸ”₯ Have you implemented GoldenGate for cloud migration? Let’s discuss in the comments! πŸ‘‡

Leave a Reply

Your email address will not be published. Required fields are marked *