Configuring the Oracle GoldenGate Parameter Files for Conflict Resolution
The following parameters are required to support conflict detection and resolution.
- Use the
COMPARECOLS
option of theMAP
parameter in the Replicat parameter file to specify columns that are to be used with before values in the ReplicatWHERE
clause. 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 theWHERE
clause; this may not be enough for conflict detection). - Use the
RESOLVECONFLICT
option of theMAP
parameter to specify conflict resolution routines for different operations and conflict types. You can useRESOLVECONFLICT
multiple times in aMAP
statement to specify different resolutions for different conflict types. However, you cannot useRESOLVECONFLICT
multiple 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 Parameters and Functions 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.