Golden Gate
Golden Gate
tgt, &
COMPARECOLS (ON UPDATE ALL, ON DELETE ALL), &
RESOLVECONFLICT (UPDATEROWEXISTS, (DEFAULT, USEMAX (last_mod_time)), & --->
compare database and trail record. If db higher ignore the record. If trail higher
update.
RESOLVECONFLICT (INSERTROWEXISTS, (DEFAULT, USEMAX (last_mod_time)), & --->
from Insert to Update
RESOLVECONFLICT (DELETEROWEXISTS, (DEFAULT, OVERWRITE)), & ---> apply
delete
RESOLVECONFLICT (UPDATEROWMISSING, (DEFAULT, OVERWRITE)), & ---> change
it to insert
RESOLVECONFLICT (DELETEROWMISSING, (DEFAULT, DISCARD)), & ---> discard
the trail record
Per COMPARECOLS, use the before image of all columns in the trail record in the
Replicat WHERE clause for updates and deletes.
Per DEFAULT, use all columns as the column group for all conflict types; thus the
resolution applies to all columns.
--------------------------
For an INSERTROWEXISTS conflict, use the USEMAX resolution: If the row exists
during an insert, use the last_mod_time column as the resolution column for
deciding which is the greater value: the value in the trail or the one in the
database. If the value in the trail is greater, apply the record but change the
insert to an update. If the database value is higher, ignore the record.
For an UPDATEROWEXISTS conflict, use the USEMAX resolution: If the row exists
during an update, use the last_mod_time column as the resolution column: If the
value in the trail is greater, apply the update.
For a DELETEROWEXISTS conflict, use the OVERWRITE resolution: If the row exists
during a delete operation, apply the delete.
For an UPDATEROWMISSING conflict, use the OVERWRITE resolution: If the row does not
exist during an update, change the update to an insert and apply it.
For a DELETROWMISSING conflict use the DISCARD resolution: If the row does not
exist during a delete operation, discard the trail record.
--------------------------
All columns are used in the WHERE clause because the COMPARECOLS statement is set
to ALL.
COMPARECOLS is in Replicat
GETBEFORECOLS is in extract
https://www.vitalsofttech.com/goldengate-active-active-database-replication-with-
conflict-detection-and-resolution/