2026-03-12 22:01:38 +01:00
|
|
|
## 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:
|
2026-05-03 09:16:04 +02:00
|
|
|
- source: CDB: NABOOPRD@wayland, PDB: EREP
|
|
|
|
|
- target: CDB: GENOSISPRD@togoria, PDB: GERISS
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
## 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:
|
|
|
|
|
|
2026-05-03 09:16:04 +02:00
|
|
|
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!"@wayland/EREP;
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
|
2026-05-03 09:16:04 +02:00
|
|
|
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!"@togoria/GERISS;
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
## 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
|
|
|
|
|
|
2026-05-03 09:21:17 +02:00
|
|
|
Add in the credentialstore enteries for database connections:
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
adminclient
|
|
|
|
|
connect https://exegol.swgalaxy:2000 deployment ogg_exegol_deploy as OGGADMIN password "Secret00!"
|
|
|
|
|
|
2026-05-03 09:21:17 +02:00
|
|
|
Optionaly store credentials to connect to deployement:
|
2026-03-12 22:01:38 +01:00
|
|
|
|
2026-05-03 09:21:17 +02:00
|
|
|
add credentials admin user OGGADMIN password "Secret00!"
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
Now we can hide the password when conecting to deployement:
|
|
|
|
|
|
|
|
|
|
connect https://exegol.swgalaxy:2000 deployment ogg_exegol_deploy as admin
|
|
|
|
|
|
2026-05-03 09:21:17 +02:00
|
|
|
Add in the credentialstore enteries for database connections:
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
create wallet
|
2026-05-03 09:21:17 +02:00
|
|
|
add credentialstore
|
|
|
|
|
alter credentialstore add user c##oggadmin@wayland/NABOOPRD password "Secret00!" alias NABOOPRD
|
|
|
|
|
alter credentialstore add user c##oggadmin@wayland/EREP password "Secret00!" alias EREP
|
|
|
|
|
info credentialstore
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
Test database connections:
|
|
|
|
|
|
2026-05-03 09:16:04 +02:00
|
|
|
dblogin useridalias NABOOPRD
|
|
|
|
|
dblogin useridalias EREP
|
2026-03-12 22:01:38 +01:00
|
|
|
|
2026-05-03 09:21:17 +02:00
|
|
|
To delete a user from credential store:
|
2026-03-12 22:01:38 +01:00
|
|
|
|
2026-05-03 09:21:17 +02:00
|
|
|
alter credentialstore delete user NABOOPRD
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
> IMPORTANT: in a database **MULTITENANT** architecture, Golden Gate is working at `CDB$ROOT` level.
|
|
|
|
|
|
|
|
|
|
Create the checkpoint table:
|
|
|
|
|
|
2026-05-03 09:16:04 +02:00
|
|
|
dblogin useridalias NABOOPRD
|
|
|
|
|
add checkpointtable EREP.c##oggadmin.checkpt
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
Set **global** parameters:
|
|
|
|
|
|
|
|
|
|
edit GLOBALS
|
|
|
|
|
|
|
|
|
|
Put:
|
|
|
|
|
|
|
|
|
|
ggschema c##oggadmin
|
2026-05-03 09:16:04 +02:00
|
|
|
checkpointtable EREP.c##oggadmin.checkpt
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## Setup `helska` Golden Gate deployment
|
|
|
|
|
|
|
|
|
|
adminclient
|
|
|
|
|
connect https://helska.swgalaxy:2000 deployment ogg_helska_deploy as OGGADMIN password "Secret00!"
|
|
|
|
|
|
2026-05-03 09:21:17 +02:00
|
|
|
Optionaly store credentials to connect to deployement:
|
2026-03-12 22:01:38 +01:00
|
|
|
|
2026-05-03 09:21:17 +02:00
|
|
|
add credentials admin user OGGADMIN password "Secret00!"
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
Now we can hide the password when conecting to deployement:
|
|
|
|
|
|
|
|
|
|
connect https://helska.swgalaxy:2000 deployment ogg_helska_deploy as admin
|
|
|
|
|
|
2026-05-03 09:21:17 +02:00
|
|
|
Add in the credentialstore enteries for database connections:
|
2026-03-12 22:01:38 +01:00
|
|
|
|
2026-05-03 09:21:17 +02:00
|
|
|
alter credentialstore add user c##oggadmin@togoria/GENOSISPRD password "Secret00!" alias GENOSISPRD
|
|
|
|
|
alter credentialstore add user c##oggadmin@togoria/GERISS password "Secret00!" alias GERISS
|
|
|
|
|
info credentialstore
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
Test database connections:
|
|
|
|
|
|
2026-05-03 09:16:04 +02:00
|
|
|
dblogin useridalias GENOSISPRD
|
|
|
|
|
dblogin useridalias GERISS
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
Create the checkpoint table:
|
|
|
|
|
|
2026-05-03 09:16:04 +02:00
|
|
|
dblogin useridalias GENOSISPRD
|
|
|
|
|
add checkpointtable GERISS.c##oggadmin.checkpt
|
2026-03-12 22:01:38 +01:00
|
|
|
|
|
|
|
|
Set **global** parameters:
|
|
|
|
|
|
|
|
|
|
edit GLOBALS
|
|
|
|
|
|
|
|
|
|
Put:
|
|
|
|
|
|
|
|
|
|
ggschema c##oggadmin
|
2026-05-03 09:16:04 +02:00
|
|
|
checkpointtable GERISS.c##oggadmin.checkpt
|
2026-03-12 22:01:38 +01:00
|
|
|
|