1

Is it possible to replicate records from the source table at a sepcific CSN?

Here is my table with each rows with their ORA_ROWSCN

ID  Name    ORA_ROWSCN
1   John    37828337
2   Mike    37828337
3   XXX     37980219
4   YYY     37980219

ID#3 and 4 were added before I started the Golden Gate extract process hence they should not be copied to the destination table (TableB). TableB (ID, Name) is the destination table which has ID#1 and 2.

I want to replicate just ID#3 and 4 into the destination table. So I added the extract (named EXTORA)

ADD EXTRACT EXTORA, INTEGRATED TRANLOG, SCN 37980219  

I then added the Remote trail:

ADD RMTTRAIL ./dirdat/rt, EXTRACT EXTORA, MEGABYTES 10

and started the extract:

START EXTRACT EXTORA ATCSN 37980219

I added the replicate step :

ADD REPLICAT REPORA, INTEGRATED, EXTTRAIL ./dirdat/rt 

and start the replicate step:

START REPLICAT REPORA, ATCSN 37980219 

Here is my extract parameters:

EXTRACT EXTORA  
USERID c##ggadmin, PASSWORD oracle  
RMTHOST rl-linux-srv02.db.net, MGRPORT 7809  
RMTTRAIL ./dirdat/rt  
DDL INCLUDE MAPPED  
DDLOPTIONS REPORT  
LOGALLSUPCOLS  
UPDATERECORDFORMAT COMPACT  
SOURCECATALOG orclpdb  
TABLE ogg.emp;  

And replicate parameters:

 REPLICAT REPORA  
    ASSUMETARGETDEFS  
    DISCARDFILE ./dirrpt/repora.dsc, PURGE, MEGABYTES 100  
    DDL INCLUDE MAPPED  
    DDLOPTIONS REPORT  
    DBOPTIONS INTEGRATEDPARAMS(parallelism 6)  
    USERID c##ggadmin@dbembdw01, PASSWORD oracle  
    MAP orclpdb.ogg.emp, TARGET dbembdw01.ogg.emp;

The issue is the records are not getting replicated to the destination table (TableB). However, if a new record is inserted into TableA it gets replicated to TableB. Can someone please help me understand why records at a specific CSN is not replicating here?

I am using Golden Gate version: OGG 12.3.0.1 and Oracle DB is 12.2

  • Reading about ORA_ROWSCN: For each row, ORA_ROWSCN returns the conservative upper bound system change number (SCN) of the most recent change to the row. This pseudocolumn is useful for determining approximately when a row was last updated. It is not absolutely precise Probably is not exactly your number. Also not really sure but I remember I read somewhere that the SCN will be the at which one will start after, so maybe it will be worth to try using your SCN -1 and see the result – dbamex Dec 4 '19 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.