Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Alter table conflicted with foreign key constraint Expand / Collapse
Posted Tuesday, January 13, 2009 11:51 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, February 28, 2014 1:34 PM
Points: 67, Visits: 328
I am trying to set up transactional replication. I have one database where there are certain tables(user tables) that we want to replicate to other servers. I set up the publication and everything seems to be fine and the creation of the subscription seems to be fine. However, when I look at the distributor to subscriber history I get an error:

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "Relation_232". The conflict occurred in database "db name", table "table name", column "column name". (Source: MSSQLServer, Error number: 547)

I have modified that constraint on the publishing database to "Enforce for Replication = No", but I am not sure why I am still getting this error after reinitializing the subscription and re-running the agent. I have also tried to delete the subscription and publication after making that change and it still doesn't seem to make a difference. Does anyone have any suggestions?
Post #635714
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse