Skip to main content
GoldenGate

How to Add New Table to the Golden Gate Replication

By December 3, 2021August 28th, 2022No Comments3 min read

Consider business owners deciding to add a new table to the Golden Gate Replication. Then the very first step is to add trandata and also, and the table should be added to all the extract, pump, and replicat processes.
For example, if you have enabled trandata and exported the table without any clauses, and imported it into the target, you may observe the replication is not at all working for this table.

The major cause of this problem is not specifying the flashback_scn to export command. Because the export/expdp will not consider the old log after the trandata. So it is highly recommended to do export based on the trandata scn.

Use the below syntax to do export/expdp with flashback_scn.

$expdp ggadmin/Welcome1 directory=dmpdir dumpfile=persons.dmp tables=ggadmin.persons flashback_scn=172859484808

Export: Release 19.0.0.0.0 - Production on Sun Jun 12 12:33:03 2021
Version 19.15.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
FLASHBACK automatically enabled to preserve database integrity.
Starting "GGADMIN"."SYS_EXPORT_TABLE_01": ggadmin/******** directory=dmpdir dumpfile=persons.dmp tables=ggadmin.persons flashback_scn=172859484808 
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/PROCACT_INSTANCE
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
. . exported "GGADMIN"."PERSONS" 6.109 KB 7 rows
Master table "GGADMIN"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for GGADMIN.SYS_EXPORT_TABLE_01 is:
/u77/refreshes/OGG_SETUP/persons.dmp
Job "GGADMIN"."SYS_EXPORT_TABLE_01" successfully completed at Sun Jun 12 12:33:36 2021 elapsed 0 00:00:33 **/

After performing export/expdp using flashback_scn and we can now see the latest transactions observed from the replicat statistics.

GGSCI (ORA-X2 as ggadmin@PRODT) 85> stats inrep1

Sending STATS request to REPLICAT INREP1 ...

Start of Statistics at 2021-06-12 12:35:24.


Integrated Replicat Statistics:

Total transactions 1.00
Redirected 0.00
Replicated procedures 0.00
DDL operations 0.00
Stored procedures 0.00
Datatype functionality 0.00
Operation type functionality 0.00
Event actions 0.00
Direct transactions ratio 0.00%

Replicating from GGADMIN.PERSONS to GGADMIN.PERSONS:

*** Total statistics since 2021-06-12 12:35:05 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

*** Daily statistics since 2021-06-12 12:35:05 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

*** Hourly statistics since 2021-06-12 12:35:05 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

*** Latest statistics since 2021-06-12 12:35:05 ***
Total inserts 1.00
Total updates 0.00
Total deletes 0.00
Total upserts 0.00
Total discards 0.00
Total operations 1.00

Replicating from GGADMIN.PERSONS to GGADMIN.EXCEPTIONS:

*** Total statistics since 2021-06-12 12:35:05 ***

No database operations have been performed.

*** Daily statistics since 2021-06-12 12:35:05 ***

No database operations have been performed.

*** Hourly statistics since 2021-06-12 12:35:05 ***

No database operations have been performed.

*** Latest statistics since 2021-06-12 12:35:05 ***

No database operations have been performed.

End of Statistics.

Leave a Reply