Files
notes/Golden_Gate/setup.md
T
2026-05-03 09:25:07 +02:00

4.3 KiB

Articles

https://www.dbi-services.com/blog/how-to-create-an-oracle-goldengate-extract-in-multitenant/ http://blog.data-alchemy.org/posts/oracle-goldengate-pluggable/

Topology

Databases:

  • source: CDB: NABOOPRD@togoria, PDB: EREP
  • target: CDB: GENOSISPRD@wayland, PDB: GERISS

Databases setup for Golden Gate

In both databases, create Golden Gate admin user in CDB$ROOT:

create user c##oggadmin identified by "Secret00!";
alter user c##oggadmin quota unlimited on USERS;
grant create session, connect,resource,alter system, select any dictionary, flashback any table to c##oggadmin container=all;
exec dbms_goldengate_auth.grant_admin_privilege(grantee => 'c##oggadmin',container=>'all');
alter user c##oggadmin set container_data=all container=current;
grant alter any table to c##oggadmin container=ALL;
alter system set enable_goldengate_replication=true scope=both;
alter database force logging;
alter database add supplemental log data;
select supplemental_log_data_min, force_logging from v$database;

On target database I had to add extra grants:

grant select any table to c##oggadmin container=ALL;
grant insert any table to c##oggadmin container=ALL;
grant update any table to c##oggadmin container=ALL;
grant delete any table to c##oggadmin container=ALL;

Create schemas for replicated tables on source and target PDB:

alter session set container=EREP;
create user R2D2 identified by "Secret00!";
alter user R2D2 quota unlimited on USERS;
grant connect,resource to R2D2;
connect R2D2/"Secret00!"@togoria/EREP;


alter session set container=GERISS;
create user C3PO identified by "Secret00!";
alter user C3PO quota unlimited on USERS;
grant connect,resource to C3PO;
connect C3PO/"Secret00!"@wayland/GERISS;

Setup exegol Golden Gate deployment

My Root CA (added to truststore host) has not be recognized by admincmient resulting OGG-12982 error while curl works perfectly.

Solution: define OGG_CLIENT_TLS_CAPATH environement variable to my root CA certificate prior to using admincmient

export OGG_CLIENT_TLS_CAPATH=/etc/pki/ca-trust/source/anchors/rootCA.pem

Add in the credentialstore enteries for database connections:

adminclient
connect https://exegol.swgalaxy:2000 deployment ogg_exegol_deploy as OGGADMIN  password "Secret00!"

Optionaly store credentials to connect to deployement:

add credentials admin user OGGADMIN password "Secret00!"

Now we can hide the password when conecting to deployement:

connect https://exegol.swgalaxy:2000 deployment ogg_exegol_deploy as admin

Add in the credentialstore enteries for database connections:

create wallet
add credentialstore
alter credentialstore add user c##oggadmin@togoria/NABOOPRD password "Secret00!" alias NABOOPRD
alter credentialstore add user c##oggadmin@togoria/EREP password "Secret00!" alias EREP
info credentialstore

Test database connections:

dblogin useridalias NABOOPRD
dblogin useridalias EREP

To delete a user from credential store:

alter credentialstore delete user NABOOPRD

IMPORTANT: in a database MULTITENANT architecture, Golden Gate is working at CDB$ROOT level.

Create the checkpoint table:

dblogin useridalias NABOOPRD
add checkpointtable EREP.c##oggadmin.checkpt

Set global parameters:

edit GLOBALS

Put:

ggschema c##oggadmin
checkpointtable EREP.c##oggadmin.checkpt

Setup helska Golden Gate deployment

adminclient
connect https://helska.swgalaxy:2000 deployment ogg_helska_deploy as OGGADMIN  password "Secret00!"

Optionaly store credentials to connect to deployement:

add credentials admin user OGGADMIN password "Secret00!"

Now we can hide the password when conecting to deployement:

connect https://helska.swgalaxy:2000 deployment ogg_helska_deploy as admin

Add in the credentialstore enteries for database connections:

alter credentialstore add user c##oggadmin@wayland/GENOSISPRD password "Secret00!" alias GENOSISPRD
alter credentialstore add user c##oggadmin@wayland/GERISS password "Secret00!" alias GERISS
info credentialstore

Test database connections:

dblogin useridalias GENOSISPRD
dblogin useridalias GERISS

Create the checkpoint table:

dblogin useridalias GENOSISPRD
add checkpointtable GERISS.c##oggadmin.checkpt	

Set global parameters:

edit GLOBALS

Put:

ggschema c##oggadmin
checkpointtable GERISS.c##oggadmin.checkpt