Following are the steps for configure the golden gate between two databases using datapump:
1. Enable supplemental logging for the object, schema, or database you want to replicate.
2. Create two tables in the HR and SCOTT schemas for the initial load example. The HR schema contains data that will be replicated to the SCOTT schema. The following statement only creates the data table structure in the SCOTT schema.
create table hr.data as select object_name,object_type,created from dba_objects
create table scott.data as select object_name,object_type,created from dba_objects where 1 = 0
3. Enable supplemental logging for table which is must to be enabled
-- login to the database
GGSCI (localhost.localdomain) 30> dblogin USERID gguser@localhost:1521/pdb1, PASSWORD gguser
Successfully logged into database.
--- enable logging for table
GGSCI (localhost.localdomain as gguser@orcl) 32> add trandata hr.data
2025-08-10 13:39:19 INFO OGG-15130 No key found for table HR.DATA. All viable columns will be logged.
2025-08-10 13:39:19 INFO OGG-15132 Logging of supplemental redo data enabled for table HR.DATA.
2025-08-10 13:39:19 INFO OGG-15133 TRANDATA for scheduling columns has been added on table HR.DATA.
2025-08-10 13:39:19 INFO OGG-15438 Enabling logical replication (with all keys) on auto capture table HR.DATA.
2025-08-10 13:39:19 INFO OGG-15135 TRANDATA for instantiation CSN has been added on table HR.DATA.
2025-08-10 13:39:20 INFO OGG-26035 Logical replication for table HR.DATA is ENABLED.
2025-08-10 13:39:20 INFO OGG-10471 ***** Oracle Goldengate support information on table HR.DATA *****
Oracle Goldengate support native capture on table HR.DATA.
Oracle Goldengate marked following column as key columns on table HR.DATA: OBJECT_NAME, OBJECT_TYPE, CREATED
No unique key is defined for table HR.DATA.
4. Now setup the Extract process before start the Initial load extract process.
GGSCI (localhost.localdomain as gguser@orcl) 40> view param ext02
EXTRACT ext02
USERID gguser@localhost:1521/pdb1, PASSWORD gguser
discardfile /u01/app/oracle/product/gg/dirrpt/ext02.dsc, purge
reportcount every 15 minutes, rate
exttrail /u01/app/oracle/product/gg/dirdat/ext02/et
TABLE hr.data;
GGSCI (localhost.localdomain as gguser@orcl) 41> dblogin userid gguser@localhost:1521/pdb1, PASSWORD gguser
Successfully logged into database.
GGSCI (localhost.localdomain as gguser@orcl) 42> add extract ext02 tranlog,begin now
Integrated Extract added.
GGSCI (localhost.localdomain as gguser@orcl) 43> add exttrail /u01/app/oracle/product/gg/dirdat/ext02/et extract ext02, megabytes 100
EXTTRAIL added.
4. Add datapump process
GGSCI (localhost.localdomain as gguser@orcl) 50> view param dpext02
extract dpext02
RMTHOST localhost, MGRPORT 7809
RMTTRAIL /u01/app/oracle/product/gg/dirdat/ext02/rt
TABLE hr.data
--- Specify the source trail file from upper extract process
GGSCI (localhost.localdomain as gguser@orcl) 48> add extract dpext02 exttrailsource /u01/app/oracle/product/gg/dirdat/ext02/et
Extract added.
-- specify the remote trail file which it write at remote server
GGSCI (localhost.localdomain as gguser@orcl) 49> add rmttrail /u01/app/oracle/product/gg/dirdat/ext02/rt extract dpext02, megabytes 100
RMTTRAIL added.
5. Configure replicate process on destination server
-- Created rep02 replicat file
GGSCI (localhost.localdomain) 6> view param rep02
replicat rep02
USERID gguser@pdb1, PASSWORD gguser
DISCARDFILE /u01/app/oracle/product/gg/dirout/rep02.dsc, APPEND
MAP hr.data, TARGET scott.data;
-- specify the datapump output file as input in replication
GGSCI (localhost.localdomain as gguser@orcl) 63> ADD REPLICAT rep02, EXTTRAIL /u01/app/oracle/product/gg/dirdat/ext02/rt, CHECKPOINTTABLE gguser.chkpt
Replicat added.
6. info all
GSCI (localhost.localdomain) 7> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED DPEXT02 00:00:00 00:10:05
EXTRACT RUNNING EXT01 00:00:00 00:00:02
EXTRACT STOPPED EXT02 00:00:00 00:18:20
REPLICAT RUNNING REP01 00:00:00 00:00:03
7. Start the extract process
GGSCI (localhost.localdomain as gguser@orcl) 75> start ext02
Sending START request to Manager ...
Extract group EXT02 starting.
8. Start the datapump process
GGSCI (localhost.localdomain as gguser@orcl) 81> start dpext02
Sending START request to Manager ...
Extract group DPEXT02 starting.
9. info all
GGSCI (localhost.localdomain as gguser@orcl) 87> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING DPEXT02 00:00:00 01:06:23
EXTRACT RUNNING EXT01 00:00:00 00:00:02
EXTRACT RUNNING EXT02 00:07:17 00:00:07
REPLICAT RUNNING REP01 00:00:00 00:00:02
REPLICAT STOPPED REP02 00:00:00 00:57:45
10. Insert the data into the table hr.data
11. Verify the files start created after start extract and datapump process
[oracle@localhost ext02]$ ls -ltr
total 31616
-rw-r-----. 1 oracle oracle 12285857 Aug 10 15:11 et000000000
-rw-r-----. 1 oracle oracle 12285929 Aug 10 15:11 rt000000000
12. Start the replication process
GGSCI (localhost.localdomain as gguser@orcl) 90> start rep02
Sending START request to Manager ...
Replicat group REP02 starting.
13. Verify the report
view report rep01
2025-08-10 15:19:39 INFO OGG-30067 Opened trail file /u01/app/oracle/product/gg/dirdat/ext02/rt000000000, RBA: 0 at 2025-08-10
15:19:39.905453.
2025-08-10 15:19:39 INFO OGG-03506 The source database character set, as determined from the trail file, is UTF-8.
2025-08-10 15:19:39 INFO OGG-06505 MAP resolved (entry hr.data): MAP "HR"."DATA", TARGET "PDB1".scott.data.
2025-08-10 15:20:05 WARNING OGG-06439 No unique key is defined for table DATA. All viable columns will be used to represent the ke
y, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
2025-08-10 15:20:05 INFO OGG-02756 The definition for table HR.DATA is obtained from the trail file.
2025-08-10 15:20:05 INFO OGG-06511 Using following columns in default map by name: OBJECT_NAME, OBJECT_TYPE, CREATED.
2025-08-10 15:20:05 INFO OGG-06510 Using the following key columns for target table PDB1.SCOTT.DATA: OBJECT_NAME, OBJECT_TYPE,
CREATED.
14. Replication is configured.
GGSCI (localhost.localdomain as gguser@orcl) 94> stats rep02
Sending STATS request to Replicat group REP02 ...
Start of statistics at 2025-08-10 15:23:15.
Replicating from HR.DATA to PDB1.SCOTT.DATA:
*** Total statistics since 2025-08-10 15:20:05 ***
Total inserts 75585.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 75585.00
*** Daily statistics since 2025-08-10 15:20:05 ***
Total inserts 75585.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 75585.00
*** Hourly statistics since 2025-08-10 15:20:05 ***
Total inserts 75585.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 75585.00
*** Latest statistics since 2025-08-10 15:20:05 ***
Total inserts 75585.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 75585.00