Setting the NOT FOR REPLICATION flag for Target Identity Columns, Triggers, and Constraints
-
Set the
NOT FOR REPLICATION
flag on the following objects.- Foreign key constraints
- Check constraints
IDENTITY
columns- Triggers (requires textual changes to the definition. See the SQL Server documentation for more information.)
For active-passive configurations, set it only on the passive database. For active-active configurations, set it on both databases.
-
Partition
IDENTITY
values for bidirectional configurations. -
In the Replicat
MAP
statements, map the source tables to appropriate targets, and map the child tables that the source tables reference with triggers or foreign-key cascade constraints. Triggered and cascaded child operations are replicated by Oracle GoldenGate, so the referenced tables must be mapped to appropriate targets to preserve data integrity. Make sure to include the same parent and child source tables in the ExtractTABLE
parameters.Note:
If referenced tables are omitted from the
MAP
statements, no errors alert you to integrity violations, such as if a row gets inserted into a table that contains a foreign key to a non-replicated table.