Golden Gate Recipe: configure Oracle12c bilateral replication

From Robs_Wiki
Jump to: navigation, search

Introduction

  • In this recipe we will setup Golden Gate bilateral replication. We will make use of the configuration we set up before, in Golden Gate Recipe 1 "Configure Oracle12c integrated replication."
  • Source environment: database prd12c on rob01db01
  • Target environment: database trg12c on rob01db02
  • The demo schema 'HR' is replicated in Golden Gate Recipe 1.


Note: If you have not yet performed Golden Gate Recipe 1, this is the moment to do so. We will need it as the basis for Recipe 2.

Some background information on GoldenGate bilateral replication

Bilateral replication is possible, but only under certain conditions. It is important to check those conditions beforehand. This is especially true for packaged applications as those applications can not (or not easily) be changed.

  • The most important condition is that DDL can not be replicated in bilateral replication.
  • Another point to note is that sequence numbers may get conflicting numbers on both databases.
  • Triggers and cascade deletes can cause isssues as well.

Please refer to the Oracle documentation for a complete list of restrictions and required actions in order for bilateral replication to work.
It is also important to configure GOlden Gate conflict procedures to deal with potential conflicts. For example:

  • A replicated insert tries to insert a row that already exists in the target system.
  • The before image of an updated row does not match the image of the row on the target system.
  • A delete command that is replicated tries to remove a reow that does not exist on the target system.
  • A column that is updated on the host system is missing on the target system.

We will build a sample conflict handler in this recipe.