Thursday, March 8, 2012

cascade deletes and updates

Hi,
I was wondering whether cascaded deletes or updates would be
replicated to the subscriber. The subscriber tables are just plain
tables without any constraints. But the publisher tables have FK
relationships. On the publishers database, if I deleted a row from the
parent table resulting in the removal of the child rows, would the
child rows also get removed in the subscriber tables? Thanks
- Komp
If the child row table is replicated then it'll work as you propose.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||By default they are replicated. If you don't want this behavior right click
on your table in EM, select Design Table, and then select the properties
icon (looks like a hand pointing to something) and click on relationships.
Ensure that Enforce Relationship for Inserts and Updates is selected and
check cascading Update Related Fields.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
<k0mput3r@.gmail.com> wrote in message
news:1140023314.624365.105580@.o13g2000cwo.googlegr oups.com...
> Hi,
> I was wondering whether cascaded deletes or updates would be
> replicated to the subscriber. The subscriber tables are just plain
> tables without any constraints. But the publisher tables have FK
> relationships. On the publishers database, if I deleted a row from the
> parent table resulting in the removal of the child rows, would the
> child rows also get removed in the subscriber tables? Thanks
> - Komp
>
|||Also ensure that the enforce relationship for replication is enabled as
well.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:e9R8BllMGHA.2036@.TK2MSFTNGP14.phx.gbl...
> By default they are replicated. If you don't want this behavior right
> click on your table in EM, select Design Table, and then select the
> properties icon (looks like a hand pointing to something) and click on
> relationships. Ensure that Enforce Relationship for Inserts and Updates is
> selected and check cascading Update Related Fields.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> 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
>
> <k0mput3r@.gmail.com> wrote in message
> news:1140023314.624365.105580@.o13g2000cwo.googlegr oups.com...
>

No comments:

Post a Comment