Resynchronizing an out-of-sync table - Oracle Golden Gate

 In this procedure, there are two Replicat groups:


● The original group, known as group A

● A new group that you will create, known as group B


To resynchronize a table

1. Comment out the out-of-sync table in the original Replicat parameter file.


2. Stop the original Replicat and start it again so it continues processing the tables that are not out-of-sync.


STOP REPLICAT <groupA>

START REPLICAT <groupA>


3.Write down the timestamp on the source system.


4.Try to resolve any long-running transactions on the source out-of-sync table. You will be copying the source data to the target, and if transactions are open while the copy is being made, they will not be captured.


5. Start a copy of the source data.


6. Import the copy to the target table.


7. Create a new Replicat group for the out-of-sync table, using BEGIN to start at the source timestamp that you recorded step 3, and using the existing trail for EXTTRAIL.


ADD REPLICAT <groupB>, EXTTRAIL <existing trail>,BEGIN <yyyy-mm-dd hh:mm:ss>


8. Create a parameter file for the new group and include HANDLECOLLISIONS.

EDIT PARAMS <groupB>


9.Start the new Replicat group. START REPLICAT <groupB>


10. View the lag of the new group until it shows “At EOF, no more records to process.”

SEND REPLICAT <groupB>, GETLAG


11. Stop the new Replicat group.STOP REPLICAT <groupB>


12. Edit the parameter file of the new group to comment out or remove HANDLECOLLISIONS.


13. Start the new Replicat group.


START REPLICAT <groupB>


The next steps merge the table back with the others so that only one Replicat group is needed again.


14. Stop Extract. STOP EXTRACT <extract_group>


15. View the lag of each Replic at group until it shows “At EOF, no more records to process.”


SEND REPLICAT <groupA>, GETLAG

SEND REPLICAT <groupB>, GETLAG


16. Stop both Replicat groups.


STOP REPLICAT <groupA>

STOP REPLICAT <groupB>


17. Uncomment the newly synchronized table in the original Replicat parameter file.


18. Start Extract.


START EXTRACT <extract_group>


19. Start the original Replicat.


START REPLICAT <groupA>


20. Delete the new Replicat that you created.


DELETE REPLICAT <groupB>


Note : we can use find current_scn from source database and take export using the flashback parameter and copy the tables to target, while starting dummy replicat group we use start replicat after csn.


Comments

Post a Comment

Popular posts from this blog

How to Solve - "WAIT FOR EMON PROCESS NTFNS"

Query Regression - "OR" Transformation Oracle 19c

ORA - 12537: TNS: connection closed