Oracle GoldenGate Active-Active Guidance for Developers and Administrators

Oracle MAA provides guidance for developers and administrators when designing an active-active distributed database architecture using Oracle GoldenGate architecture, where data conflicts may occur between GoldenGate replicas.

For these Oracle GoldenGate or MAA Platinum architectures, active-active replication requires conflict detection and resolution, which includes Automatic Conflict Detection and Resolution (Auto-CDR), or the manual method of conflict detection and resolution using the GoldenGate parameters COMPARECOLS and RESOLVECONFLICT (referred to as the COMPARECOLS/RESOLVECONFLICTS method in this topic). Also see Automatic Conflict Detection and Resolution and Manual Conflict Detection and Resolution in Oracle GoldenGate documentation.

For more information about GoldenGate in general, refer to Oracle GoldenGate documentation. These instructions are specific for Oracle-to-Oracle replication. For non-Oracle/heterogeneous active-active refer to COMPARECOLS and RESOLVECONFLICT parameters in the Oracle GoldenGate Parameters and Functions Reference Guide.

Preparing for Conflict Resolution

Active-active replication requires tighter integration between Oracle AI Database and Oracle GoldenGate, and there are some additional requirements that must be met from an application and database structure perspective to ensure a smooth experience.

These requirements only pertain to tables that could have a conflict. If there are tables in the application that will be updated on one server only (for example, a lookup table that contains zip codes to city relationships that is updated once a year as part of a batch process) then those tables do not need to meet these requirements.

To understand why these requirements exist, here’s a quick refresher on how a conflict is detected and how it’s resolved:

To detect a conflict, Oracle GoldenGate constructs an UPDATE or DELETE DML statement with a WHERE clause that includes the before image of every column that the GoldenGate Replicat can use in a WHERE clause. If that DML operation returns a “row not found” exception, that means that there is a conflict, and additional steps are then taken by the Replicat to determine if some other value in that row was changed, or if the row was deleted. This determination is done by querying the target table to see if the row with that primary key exists or not. The resolution portion will provide eventual consistency so that the two rows are the same between two distinct databases. This resolution typically involves ignoring the current DML operation the Replicat is applying, or overwriting the existing data in the target row.

The Oracle GoldenGate documentation covers the different ways to resolve conflicts for both Auto-CDR and COMPARECOLS/RESOLVECONFLICTS methods as well as examples on how each of them work. See Automatic Conflict Detection and Resolution and Manual Conflict Detection and Resolution for details.

Requirements

Best Practices for Active-Active Oracle GoldenGate Architecture

To ensure that your active-active configuration runs smoothly these are some best-practice recommendations to consider.

Application Recommendations

Database Recommendations

Oracle GoldenGate Recommendations