I wish to implement cascading deletes with a SQL-Server merge application.
I have google'd this and have reached the conclusion this is possible.
My question is how to implement this...
I've checked the 'cascade delete for related records' option in the EM ERD.
But i know from searching the replication newgroup there will be problems if
the delete instruction for the parent gets replicated before the children.
Hilary Cotter mentioned in another post that one should 'disable the
enforcement of constraint for replication' - thus allowing for any delete
order to succeed. I am not sure how to implement this though.
Can this be implemented in the EM diagram GUI or do i massage the table
definition code?
Thanks very much.
right click on your table in EM, select design table, properties,
relationships. You will find the option to do this there.
I am not totally convinced this will be the best approach for you. What is
means is that the constraint will be enforced for non replication
processes - i.e. a user or app. However the constraint will not be enforced
when the tables are updated by a replication process.
I am convinced that you need this option for transactional replication.
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
"astro" <astro@.bcmn.com> wrote in message
news:GII0e.13694$hu3.11248@.twister.rdc-kc.rr.com...
> I wish to implement cascading deletes with a SQL-Server merge application.
> I have google'd this and have reached the conclusion this is possible.
> My question is how to implement this...
> I've checked the 'cascade delete for related records' option in the EM
ERD.
> But i know from searching the replication newgroup there will be problems
if
> the delete instruction for the parent gets replicated before the children.
> Hilary Cotter mentioned in another post that one should 'disable the
> enforcement of constraint for replication' - thus allowing for any delete
> order to succeed. I am not sure how to implement this though.
> Can this be implemented in the EM diagram GUI or do i massage the table
> definition code?
> Thanks very much.
>
>
|||I think this will work if you can minimize the possibility of conflicts
using partitioning. Otherwise you might end up with orphaned children.
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
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eLvpsjOMFHA.3760@.TK2MSFTNGP12.phx.gbl...
> right click on your table in EM, select design table, properties,
> relationships. You will find the option to do this there.
> I am not totally convinced this will be the best approach for you. What is
> means is that the constraint will be enforced for non replication
> processes - i.e. a user or app. However the constraint will not be
enforced[vbcol=seagreen]
> when the tables are updated by a replication process.
> I am convinced that you need this option for transactional replication.
> --
> 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
> "astro" <astro@.bcmn.com> wrote in message
> news:GII0e.13694$hu3.11248@.twister.rdc-kc.rr.com...
application.[vbcol=seagreen]
> ERD.
problems[vbcol=seagreen]
> if
children.[vbcol=seagreen]
delete
>
|||"uncheck 'enforce relationships for replication'?...
If the consequences of this are I might end up with orphans I think I'll
just 'roll my own' code to do the deletes...
thanks )
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eLvpsjOMFHA.3760@.TK2MSFTNGP12.phx.gbl...
> right click on your table in EM, select design table, properties,
> relationships. You will find the option to do this there.
> I am not totally convinced this will be the best approach for you. What is
> means is that the constraint will be enforced for non replication
> processes - i.e. a user or app. However the constraint will not be
> enforced
> when the tables are updated by a replication process.
> I am convinced that you need this option for transactional replication.
> --
> 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
> "astro" <astro@.bcmn.com> wrote in message
> news:GII0e.13694$hu3.11248@.twister.rdc-kc.rr.com...
> ERD.
> if
>
Showing posts with label implement. Show all posts
Showing posts with label implement. Show all posts
Sunday, 12 February 2012
Subscribe to:
Posts (Atom)