0% found this document useful (0 votes)
79 views12 pages

Goldengate Replication

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views12 pages

Goldengate Replication

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

ORACLE GOLDENGATE REPLICATION

Goldengate Basic-architecture:

ENVIRONMENT :
OS: oracle linux 7.9
Database version: 19C
Database type: CDB-PDB

Source (node1) Target(node2)


db_name PRODCDB db_name PRODCDB
db_unique_name PRODCDB db_unique_name DRCDB
instance_name PRODCDB instance_name DRCDB
service_names PRODCDB service_names DRCDB

Steps to install oracle linux:


https://www.linkedin.com/posts/umesh-shinde-989187209_oracle-linux-installation-activity-
7141727733537046528-OGsK?utm_source=share&utm_medium=member_desktop

Steps to configure oracle ASM in RAC setup


https://www.linkedin.com/posts/umesh-shinde-989187209_oracle-grid-setup-activity-
7144377605201231874-owGr?utm_source=share&utm_medium=member_desktop

Steps to configure and install database:


https://www.linkedin.com/posts/umesh-shinde-989187209_oracle-19c-multitenant-database-
activity-7147836889746632704-gEmy?utm_source=share&utm_medium=member_desktop
Installing Oracle GoldenGate 19.1.0.0.4 for Oracle DB 19c

1. Installing Goldengate

➢ Download and unzip the Goldengate software at GG home location

Run “runinstaller” to begin installation from software location.

Select oracle GG for 19C (as we are using 19c oracle DB)

➢ next
Mention the GG home location,Oracle database home location and keep default port for manager.

Check the start manager box

➢ next

➢ Next
Note : Do the same process for Target Database

Installation of Goldengate Software completed

2. User and GG parameters


create a common user and configure the database to be ready to extract data via GoldenGate:
SQL>create user c##ggadmin identified by password;
SQL>alter system set enable_goldengate_replication=TRUE;
SQL> grant create session, connect,resource,alter system, select any dictionary, flashback any table
to c##ggadmin container=all;
SQL>exec dbms_goldengate_auth.grant_admin_privilege(grantee => 'c##ggadmin',container=>'all');
SQL> alter user c##ggadmin set container_data=all container=current;
SQL> grant alter any table to c##ggadmin container=ALL;

Note : Do the same process for Target Database

3. Manager Process

On source Database:

./ggsci

Create environment:

export OGG_HOME=/oracle/app/oracle/product/ogg_src
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$OGG_HOME/bin:$PATH
export JAVA_HOME=$OGG_HOME/jdk

>./ggsci

GGSCI (node1.com) 3> start manager


4. Add Trandata

On source Database:

./ggsci

GGSCI (node1.com) 1> dblogin userid c##ggadmin@prodpdb2,password password

GGSCI (node1.com as c##ggadmin@PRODCDB/PRODPDB) 2> add trandata PRODPDB.APPUSER.DEPT


GGSCI (node1.com as c##ggadmin@PRODCDB/PRODPDB) 3> info trandata PRODPDB.APPUSER.DEPT

5. Add Credentialstore
On source Database:

GGSCI (node1.com) 2> ADD CREDENTIALSTORE


GGSCI (myserver) 10> alter credentialstore add user c##ggadmin@prodpdb1 alias ggadmin_exacc
6. Add Extract Process 1

On source Database:

./ggsci
GGSCI (node1.com) 1> ADD EXTRACT extint, INTEGRATED TRANLOG, BEGIN NOW

GGSCI (node1.com) 2> ADD EXTTRAIL /oracle/app/oracle/product/ogg_src/dirdat/lt, EXTRACT extint

The extract must be registered into the root container (CDB$ROOT) even the data to capture are from the
PDB

GGSCI (node1.com) 3>dblogin useridalias ggadmin_exacc

> REGISTER EXTRACT exint,DATABASE CONTAINER(PRODPDB)

Save the SCN –> < from output of above command.>

➢ Edit param extint

EXTINT parameter:
7. Start Extract 1

On source Database:

Start the Extract always from the CDB$ROOT:

Start extract extint atcsn <scn no.>

Start extract extint atcsn 3602774

8. Add Extract Process 2

On source Database:

./ggsci
GGSCI (node1.com) 1> ADD EXTRACT dpint,
EXTTRAILSOURCE/oracle/app/oracle/product/ogg_src/dirdat/lt

GGSCI (node1.com) 2> ADD RMTTRAIL /oracle/app/oracle/product/ogg_trg/dirdat/rt, EXTRACT dpint


DBlogin useridalias ggadmin_exacc
as root container>
> edit param dpint

EXTRACT dpint
useridalias ggadmin_exacc
RMTHOST 192.168.0.112, MGRPORT 7809
RMTTRAIL /oracle/app/oracle/product/ogg_trg/dirdat/rt
PASSTHRU
TABLE PRODPDB.APPUSER.DEPT;

9. Start Extract 2

On source Database:

Start the Extract always from the CDB$ROOT:

>Start extract dpint

Now, all the configuration at source DB is completed.

Target Database
10. Add Credentialstore
GGSCI (node2.com) 1> ADD CREDENTIALSTORE
GGSCI (node2.com) 2> alter credentialstore add user c##ggadmin@drpdb1 alias ggadminr
(for root container)

GGSCI (node2.com) 6> alter credentialstore add user c##ggadmin@drpdb2 alias ggadmin_plr

(for pluggable DB)

11. Add REPLICAT Process


Note: In Integrated Replicat connection is done to pluggable DB. Hence dblogin to pluggable
database is needed.

> ADD REPLICAT repint,integrated EXTTRAIL /oracle/app/oracle/product/ogg_trg/dirdat/rt

Edit Replicat parameter file:

➢ Edit param repint

REPLICAT repint
useridalias ggadmin_plr
DBOPTIONS INTEGRATEDPARAMS(parallelism 6)
ASSUMETARGETDEFS
MAP PRODPDB.APPUSER.DEPT;, TARGET PRODPDB.APPUSER.DEPT;
12. Start REPLICAT Process

GG configuration completed on Both the source and target DB.

Now, let’s check the data replication functionality by inserting raw data in “DEPT” table at source DB

➢ Insert into APPUSER.DEPT values(1,’dwd’,’fefefef’); < at source DB.

The Data replicated successfully at Target DB.

== Thank You ==

You might also like