0% found this document useful (0 votes)
4 views5 pages

Bidirectional Notes

The document outlines the setup and configuration of Oracle GoldenGate for database replication between two databases, ggate1 and ggate2. It includes commands for enabling replication, adding supplemental logging, and configuring extract and replicat processes. Additionally, it addresses conflict resolution in bidirectional replication scenarios and application-level considerations for primary and standby databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views5 pages

Bidirectional Notes

The document outlines the setup and configuration of Oracle GoldenGate for database replication between two databases, ggate1 and ggate2. It includes commands for enabling replication, adding supplemental logging, and configuring extract and replicat processes. Additionally, it addresses conflict resolution in bidirectional replication scenarios and application-level considerations for primary and standby databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

DB prerequisites on ggate 1 and ggate 2:

Alter system set nebale_goldengate_replication=TRUE;

Alter database add supplemental log data(all) columns;

Archivelog log list

Add trandata using obey command on oggdb2:

vi trandata.oby

Dblogin useridalias sourcegg2_pdb

Add trandata pdb2.ggtraining2.dept22

Add trandata pdb2.ggtraining2.emp22

GGSCI> obey trandata.oby

vi deployment.oby

Dblogin useridalias sourcegg2_cdb

Add extract extbi10,integrated tranlog ,begin now

Register extract extbi10,database container(pdb2)

Add exttrail /data/app/oracle/ogg_trg/dirdat/lt,extract extbi10

Add extract dpbi10,exttrailsource /data/app/oracle/ogg_trg/dirdat/lt

Add rmttrail /data/app/oracle/ogg_src/dirdat/rt,extract dpbi10

Info all

GGSCI>Obey deployment.oby

Exit

cd dirprm

vi tables_list.inc

TABLE pdb2.ggtraining2.dept22;

TABLE pdb2.ggtraining2.emp22;
Edit param extbi10

EXTRACT EXTBI10

useridalias sourcegg2_cdb

TRANLOGOPTIONS IntegratedPARAMS (MAX_SGA_SIZE 100)

TRANLOGOPTIONS EXCLUDETAG 00

EXTTRAIL /data/app/oracle/ogg_trg/dirdat/lt

Include /data/app/oracle/ogg_trg/dirprm/tables_list.inc

cd $ORACLE_HOME/dirprm

vi table_list.inc

TABLE pdb2.ggtraining2.dept22;

TABLE pdb2.ggtraining2.emp22;

Edit param dpbi10

EXTRACT DPBI10

RMTHOST ggate1,MGRPORT 7809

RMTTRAIL /data/app/oracle/ogg_src/dirdat/rt

Include /data/app/oracle/ogg_trg/dirprm/tables_list.inc

Start extbi10

Start dpbi10

Now perform operation on ggate1:

vi deploy.oby

Dblogin useridalias sourcegg1_pdb

Add replicat repbi10,integrated exttrail /data/app/oracle/ogg_src/dirdat/rt

obey deploy.oby
Edit param repbi10

REPLICAT REPBI10

useridalias sourcegg1_pdb

DBOPTIONS INTEGRATEDPARAMS(PARALLELISM 2)

ASSUMETARGETDEFS

MAP PDB2.ggtraining2.dept22, TARGET PDB1.ggtraining1.dept11;

MAP PDB2.ggtraining2.emp22, TARGET PDB1.ggtraining1.emp11;

Start repbi

Start dpint19

Start extint19

Conflict in Bidirectional:

Insert-insert

1 Sales Canada 10 sep 2023 10:00:00 AM 1 Acc India 10 sep 2023 10:00:01 AM

1 Acc India 1 Acc India

Update-update
1 Sales Canada 1 Sales Canada

Update dept11 Update dept11

Set dname=HR;

Set loc=India;

1 Sales india 1 HR CANADA

1 HR INDIA 1 HR INDIA

Update-delete

1 SALES INDIA 1 SALES INDIA

Update dept11 delete from dept22 where deptno=1;


Set loc=US;

1 SALES US 10 sep 2023 10 AM

Application level:

PK using sequences

ODD KPK--->Even PK

1 2,4,6,8

BAL-

10000

1000

500

8500

Primary ------------------>Standby database

Bidirectional:

Bidirectional-Active Active

Ext---pump---Rep

Rep—Pump--Ext
Bidirectional Active passive

You might also like