Thanks for your detailed answer. I am still confused. I have been
Replication checked and I don't see any issue so far... I am still wondering
"Hilary Cotter" wrote:
> this is a very complex question and has different meaning for different
> replication types.
>
> Basically transactional replication replicates transactions transactionally.
>
> So if you delete a row in a parent table and have cascading updates and
> enforce the relationship for replication the delete on the parent will be
> replicated to the subscriber. The cascading deletes will be kicked off on
> the publisher and the corresponding child records will be deleted. With the
> enforce the relationship for replication the cascading delete will occur on
> the subscriber child rows. If you are replicating the child table, the
> deletes will not be replicated. If you have unchecked the enforce the
> relationship for replication the cascading deletes on the child will be
> replicated.
>
> The cascading deletes will be done in the same transactional context on the
> publisher, and in another transactional context on the subscriber.
>
> Now I can hear you shaking your head and asking yourself, why would I want
> to uncheck this option. You may have before or after triggers, or your
> stored procedures may have business logic where you want the cascading
> deletes handled in a different manner, or if you don't have cascading
> deletes on the subscriber, you will want the child deletes to be replicated.
>
> The same holds true for cascading updates.
>
> Now for merge its a whole different ball game. Basically in merge you want
> to send as little data to the subscriber or vice versa to the publisher as
> possible. So you horizontally filter your tables using filters, including
> join filters which walk the DRI. So if a parent record is part of the
> filter, and you have join filters, the child records might also be. If you
> enforce the relationship for replication only the parent update/delete will
> be merged. The corresponding cascading update/delete will occur on the other
> end during the synchronization. Again you may have different constraints,
> triggers on the other side, or you find that the parent and child record are
> not replicated in order and may get agent failure. Un-checking this option
> will mitigate this behavior.
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
>
http://www.nwsu.com/0974973602.html >
> Looking for a FAQ on Indexing Services/SQL FTS
>
http://www.indexserverfaq.com >
> "Ed" <Ed@discussions.microsoft.com> wrote in message
> news:9B6BA81D-27E2-47E0-BFC8-C2B7F0A6FF6C@microsoft.com...
> > hi,
> > Could anyone explain to me under the relationship property, what is the
> > meaning of "Enforce relationship for replication"?
> > I understand that the "Not for Replication" in Trigger is that the
> > trigger
> > won't get fired off if the data is Insert/Update/Delete during the
> > replication process.
> >
> > I cannot figure out what is the "Enforce relationship for replication" and
> > how it will affect the replication process????
> >
> > Thanks
> > Ed
>
>