David - can you post up the script you were using and I'll take a look.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
David - 26 Jan 2007 14:41 GMT
Paul,
I was trying to do it in Enterprise Manager instead of script. I then went
into the Snapshot Agent and restarted the snapshot agent, which I thought
would pick up the new settings. I then re-initialized the subscription at
the laptop but it didn't pick up the removal of "Enforce relationship for
replication".
Do I need to completely re-create the publication? If I can do it in a
script then what script do I use to run on the laptops and where can I find
the syntax for changing this relationship property? Thank you.
David
> David - can you post up the script you were using and I'll take a look.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
Paul Ibison - 29 Jan 2007 09:40 GMT
Hi David - have answered your other thread below.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
David - 26 Jan 2007 17:23 GMT
Also, do I need to run sp_addscriptexec at both the publisher and
subscriber? I read the BOL and they said you have to be sysadmin to run it
but the laptops are not. Thanks.
David
> David - can you post up the script you were using and I'll take a look.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
Paul Ibison - 29 Jan 2007 09:39 GMT
David,
the script is in the form:
ALTER TABLE dbo.yourFKtable
DROP CONSTRAINT yourFKtable1
GO
ALTER TABLE dbo.yourFKtable WITH NOCHECK ADD CONSTRAINT
yourFKtable1 FOREIGN KEY
(
PKColumn
) REFERENCES dbo.YourPKTable
(
pkcolumn
) NOT FOR REPLICATION
GO
You'll need to run this at the publisher to change the publisher tables then
add it to the publication using sp_addscriptexec.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
David - 29 Jan 2007 16:28 GMT
Thanks Paul. Will I have to run sp_addscriptexec at the subscribers also or
will that happen when they synch?
David
> David,
>
[quoted text clipped - 20 lines]
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
Paul Ibison - 29 Jan 2007 17:21 GMT
David - the merge agent will take care of applying it to the subscribers.
Cheers,
Paul Ibison