June 12, 2009 at 3:08 pm
I messed with a foreign key contstraint on one of my subscibers(I deleted it and then re-added it back). Since then the snapshot fails with the following message: "Updates at a subscriber may violate constraints at the publisher because foreign key constraints were not scripted".
1. How do I find the unscripted constraint?
2. Where can I find a log file with more detail?
3. How does one fix the snapshot?
Thanks
June 16, 2009 at 7:27 am
Hi,
Do you mean your distribution agent is failing?
What type of replication are you using ?
Thanks
Graeme
June 17, 2009 at 7:59 am
It's a merge replication and I don't believe the distribution agent is failing but rather the generating of the snapshot is failing.
June 17, 2009 at 8:09 am
Why are you running the snapshot agent again....is it scheduled. This should only be run when you first synchronise.
Regards
Graeme
June 17, 2009 at 8:20 am
Here's the history. Certain records were not replicating to a particular subscriber due to what I thought might be foreign key constraints. So I remove the FK from the subscriber only which must have triggered a snapshot generation. It attempted 10 times to generate the snapshot but failed.
June 17, 2009 at 9:15 am
Hello,
The snapshot agent is not triggered by anything. Unless I've missed something. It will have it's own job which may or may not have a schedule. This is controlled by you.
You can drop and re-apply FK's by using the ALTER TABLE command. You cannot do this on SQL 2000 where the table is part of Merge/Tran rep. but it is possible on SQL 2005 and above.
I don't know what version you are using. But it sounds like 2005 or 2008
Are your FKs set to NOT for REPLICATION ?
Have you thought of dropping the publication entirely and starting again.
How big is your database ?
June 17, 2009 at 10:13 am
It is SQL 2000. According to what you are saying, I have probably damaged the publication. My FK's are not set to "Not for Replication". I am giving serious thought to dropping the publication and rebuilding it.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply