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:25:07 +02:00
- source: CDB: `NABOOPRD@togoria, PDB: EREP`
2026-05-03 18:15:48 +02:00
- target: CDB: `GENOSISPRD@wayland, 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` :
2026-05-03 20:01:35 +02:00
``` sql
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 ;
2026-05-10 16:49:17 +02:00
grant create procedure , create view to c # # oggadmin container = all ;
2026-05-03 20:01:35 +02:00
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 ;
```
2026-03-12 22:01:38 +01:00
> On **target** database I had to add extra grants:
2026-05-03 20:01:35 +02:00
``` sql
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 ;
```
2026-03-12 22:01:38 +01:00
Create schemas for replicated tables on source and target PDB:
2026-05-03 20:01:35 +02:00
``` sql
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 ;
2026-03-12 22:01:38 +01:00
2026-05-03 20:01:35 +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! " @ wayland / GERISS ;
```
2026-05-03 10:47:40 +02:00
For both Golden Gate hosts (`exegol` and `helska` ) `depl26ai` the password of Service Manager administrator has been defined:
- username: `oggadmin`
- password: `Alabalaportocala00_`
and `depl26ai` deployement has been created.
> Both username/password are case sensitive.
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
2026-05-03 10:47:40 +02:00
connect https://exegol.swgalaxy:2000 deployment depl26ai as oggadmin password "Alabalaportocala00_"
2026-03-12 22:01:38 +01:00
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 10:47:40 +02:00
add credentials admin user oggadmin password "Alabalaportocala00_"
2026-03-12 22:01:38 +01:00
Now we can hide the password when conecting to deployement:
2026-05-03 10:47:40 +02:00
connect https://exegol.swgalaxy:2000 deployment depl26ai as admin
2026-03-12 22:01:38 +01:00
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
add credentialstore
2026-05-03 09:24:25 +02:00
alter credentialstore add user c##oggadmin @togoria/NABOOPRD password "Secret00!" alias NABOOPRD
alter credentialstore add user c##oggadmin @togoria/EREP password "Secret00!" alias EREP
2026-05-03 09:21:17 +02:00
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.
2026-05-03 10:47:40 +02:00
In an Oracle Multitenant architecture (Oracle 19c through 23c), the placement of the Oracle GoldenGate checkpoint table depends on whether you are configuring the Extract (source) or the Replicat (target):
1. Target Side (Replicat): Inside the PDB
2. Source Side (Extract): Root Container (CDB$ROOT)
> Integrated Extracts store their recovery checkpoints primarily in the database's internal logmining server metadata and in .cpe checkpoint files on the GoldenGate file system. You do not manually create a standard "checkpoint table" for an Extract in the same way you do for a Replicat
2026-05-03 11:07:14 +02:00
> In an Oracle Multitenant environment, the rule is: One Checkpoint Table per PDB, but that table can be shared by multiple Replicats operation in the **same** PDB
2026-05-03 11:09:09 +02:00
> When you are using a shared checkpoint table within each PDB, you can set a default in your GLOBALS file to make your life easier.
2026-05-03 11:07:14 +02:00
If `EREP` PDB will be a replication target, create the checkpoint table:
2026-03-12 22:01:38 +01:00
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 11:07:14 +02:00
checkpointtable c##oggadmin .checkpt
2026-03-12 22:01:38 +01:00
## Setup `helska` Golden Gate deployment
adminclient
2026-05-03 10:47:40 +02:00
connect https://helska.swgalaxy:2000 deployment depl26ai as oggadmin password "Alabalaportocala00_"
2026-03-12 22:01:38 +01:00
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 10:47:40 +02:00
add credentials admin user oggadmin password "Alabalaportocala00_"
2026-03-12 22:01:38 +01:00
Now we can hide the password when conecting to deployement:
2026-05-03 10:47:40 +02:00
connect https://helska.swgalaxy:2000 deployment depl26ai as admin
2026-03-12 22:01:38 +01:00
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:24:25 +02:00
alter credentialstore add user c##oggadmin @wayland/GENOSISPRD password "Secret00!" alias GENOSISPRD
alter credentialstore add user c##oggadmin @wayland/GERISS password "Secret00!" alias GERISS
2026-05-03 09:21:17 +02:00
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
2026-05-03 11:07:14 +02:00
If `GERISS` PDB will be a replication target, create the checkpoint table:
2026-03-12 22:01:38 +01:00
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
2026-05-10 16:49:17 +02:00
For replicat add **heartbeattable ** in the **PDB ** :
dblogin useridalias GERISS
add heartbeattable
2026-03-12 22:01:38 +01:00
Set **global ** parameters:
edit GLOBALS
Put:
ggschema c##oggadmin
2026-05-03 11:07:14 +02:00
checkpointtable c##oggadmin .checkpt
2026-03-12 22:01:38 +01:00