OVERRIDEDUPS | NOOVERRIDEDUPS
Valid For
Replicat
Description
Use the OVERRIDEDUPS and NOOVERRIDEDUPS parameters to control whether or not Replicat overwrites an existing record in the target database with a replicated one if both records have the same key.
-
OVERRIDEDUPSoverwrites the existing record. It can be used for initial loads where you do not want to truncate target tables prior to the load, or for the resynchronization of a target table with a trusted source. Use theSQLDUPERRparameter withOVERRIDEUPSto specify the numeric error code that is returned by the database for duplicateINSERToperations. See "SQLDUPERR" for more information. -
NOOVERRIDEDUPS, the default, generates a duplicate-record error instead of overwriting the existing record. You can use an exceptionsMAPstatement with aSQLEXECclause to initiate a response to the error. Otherwise, the transaction may abend. For more information about exceptions maps, see Administering Oracle GoldenGate.To bypass duplicate records without causing Replicat to abend when an exceptions map is not available, specify a
REPERRORparameter statement similar to the following, whereerroris the database error number for primary key constraint errors.REPERROR (error, IGNORE)For example, the statement for an Oracle database would be:
REPERROR (1, IGNORE)
Replicat writes ignored duplicate records to the discard file.
Place OVERRIDEDUPS or NOOVERRIDEDUPS before the TABLE or MAP statements that you want it to affect. You can create different rules for different groups of TABLE or MAP statements. The parameters act as toggles: one remains in effect for subsequent TABLE or MAP statements until the other is encountered.
OVERRIDEDUPS is enabled automatically when HANDLECOLLISIONS is used. See "HANDLECOLLISIONS | NOHANDLECOLLISIONS" for more information.
WARNING:
When OVERRIDEDUPS is in effect, records might not be processed in chronological order across multiple Replicat processes.
Default
NOOVERRIDEDUPS
Syntax
OVERRIDEDUPS | NOOVERRIDEDUPS