Oracle Golden Gate sequences

615 Views Asked by At

In Oracle Golden Gate, I'm unable to replicate production sequence to replicate database, since as sequence increased by 1 in production, the count of sequence in target increasing by 2.

Let me elaborate, suppose I have sequence with currval 190, assume after initail load, target sequence also have currval 190.

Now I booked a deal and sequence no get increased by 1 in production, currval is 191 but when i checked in target db, sequence currval showing 192. This creating issue. Need help in resolving this...

2

There are 2 best solutions below

1
On

Did you follow below procedure for your replicate: 1. running sequence.sql in oracle sqlplus. 2.ALTER TABLE sys.seq$ ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;

0
On

There are a couple of scenarios when this can happen.

Scenario 1: If the replication setup is a bi-directional replication then sequences are kept at sequnce+1 value on target database. This is done so that just in case a failover or switchover has to happen from source to target database then there will be no need to reset the sequence number to a higher value. Check with your Golden Gate DBA to get more details on how sequences are being maintained.

Scenario 2: In Bi-directional replication with conflict detection and resolution-sequences are maintained so that they can be uniquely identified.

Eg:

Primary site will have sequences which are always ODD and standby site will always have sequences with even numbers. By doing this you will be able to clearly identify on which database sequence has increased.