Foreign key failure with Merge Replication

  • I have two table with primary key and foreign key relationship. Both the

    tables have primary key with Uniqueidentifier column. First uniqueidnetifer

    column is mapped to second table as Foregein key.

    Sometimes, the process of insertion is like first inserting foreign

    key table then primary key table. As a result conflict arises and data is rolledback.

    I have been asked to set the property of this specific field as 'Not for replication'.

    How can i do that without disturbing the current replication. I need to do it through script.

    Thanks

  • You can drop and reapply FKs while replication is running although I would stop all the agents while you re-apply.

    You can drop the FKs and reapply with the NOT For Replication setting.

    HTH

    Graeme

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply