Configuring the Oracle GoldenGate Parameter Files for Conflict Resolution
The following parameters are required to support conflict detection and resolution.
- Use the
COMPARECOLSoption of theMAPparameter in the Replicat parameter file to specify columns that are to be used with before values in the ReplicatWHEREclause. The before values are compared with the current values in the target database to detect update and delete conflicts. (By default, Replicat only uses the primary key in theWHEREclause; this may not be enough for conflict detection). - Use the
RESOLVECONFLICToption of theMAPparameter to specify conflict resolution routines for different operations and conflict types. You can useRESOLVECONFLICTmultiple times in aMAPstatement to specify different resolutions for different conflict types. However, you cannot useRESOLVECONFLICTmultiple times for the same type of conflict. Use identical conflict-resolution procedures on all databases, so that the same conflict produces the same end result. One conflict-resolution method might not work for every conflict that could occur. You might need to create several routines that can be called in a logical order of priority so that the risk of failure is minimized.
Note:
Additional consideration should be given when a table has a primary key and additional unique indexes or unique keys. The automated routines provided with the COMPARECOLS and RESOLVECONFLICT parameters require a consistent way to uniquely identify each row. Failure to consistently identify a row will result in an error during conflict resolution. In these situations the additional unique keys should be disabled or you can use the SQLEXEC feature to handle the error thrown and resolve the conflict.
For detailed information about these parameters, see Reference for Oracle GoldenGate. See the examples starting on CDR Example 1: All Conflict Types with USEMAX, OVERWRITE, DISCARD, for more information on these parameters.