Guenadi N Jilevski's Oracle BLOG

Oracle RAC, DG, EBS, DR and HA DBA BLOG

Using Oracle GoldenGate (OGG) 11gR2 for Conflict Detection and Resolution (CDR) based on balance and timestamp in a bidirectional active-active configuration

Using Oracle GoldenGate (OGG) 11gR2 for Conflict Detection and Resolution (CDR) based on balance and timestamp in a bidirectional active-active configuration

In the article you will have a look at an example for CDR implementation based on a balance and timestamp column in a bidirectional active-active OGG setup. I will build an active-active bidirectional OGG replication between two sites (RACD, RACDB) each having identical tables (test5.account, test5.seat_assignment). I will emphasize on the requirements for CDR implementation and will outline CDR concepts and illustrate a step-by step CDR implementation, testing and troubleshooting. I will cover two cases

  • Use delta method for account balance CDR – An initial balance of 1000 will be simultaneously credited 200 on site B and debited 100 on site A. The result will be 1100 on both site A and site B.
  • Use USEMIN timestamp method for seat booking CDR – a seat ‘2A’ will be booked 1st by John Smith on site A and at about the same time will be booked by Pier Cardin on site B. The result will be the first user on both site A and site B.

Starting with OGG 11gR2 there are build in options in the MAP replicat parameter, such as COMPARECOLS, RESOLVECONFLICT, and in the TABLE extract parameter, such as GETBEFORECOLS, allowing easy, automatic and OGG driven CDR compared to the methods involving SQL or PLSQL code invoked from SQLEXEC used for CDR in versions of OGG prior to 11gR2.
Continue reading

November 7, 2012 Posted by | oracle | 4 Comments