API User Reporting
07 March 2018
I need to know whether or not you are going to do as I state needs to be done, which is create the foreign keys with NOCHECK and then immediately alter them to NOCHECK. Adding with NOCHECK simply bypasses referential integrity check at the time the constraint is created. That is why the constraint must be immediately altered to NOCHECK to make sure foreign key constraints are not enforce after the constraint is created.
If you do not do such, replication can, and will, have errors that get created because of foreign key constraint violations.
Not creating the constraints is not a viable alternative, as from a data modeling perspective alone, it is useful, if not necessary to have the foreign keys created in order to have viable metadata in the target database to understand the relationships between replicated objects.
So, please tell me if this is going to be done. It is a major source of concern for my client with respect to successful data replication without the loss of the critical metadata provided by a NOCHECK foreign key constraint.
It also improves replication performance to not have the constraints being checked during replication.