Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Replication (2005)
 SQL2005 replication: Problem with dynamic filters

Author  Topic 

soukos
Starting Member

1 Post

Posted - 2008-10-29 : 06:37:39
Hi!

We are replicating data from a SQL Server 2005 to several client subscribers (MSSQLExpress) using dynamic filters.

In the published tables we are using composite keys, on which the filters are set.

The error occurs as follows:

1. The application is updating data on a filtered field (which is member of the composite key) AND on a second field, in the same table, which is also member of the composite key.

2. If the subscriber is synchronizing now, he gets a conflict, more precisely the "Violation of PRIMARY KEY Constraint" error.


Number--Field1--Field2--rowguid
002444----01-----1------CC
001666----01-----0------AA
001666----01-----1------BB

002444----01-----2------BB

The Filter is set on the "Number" field.
The fields "Number" and "Field2" from the third datarow are changed.

It seems like the agent is first updating the "Number" field instead of updating the whole row at once and then of cource gets an error.

Does anybody know how i can solve this problem?

Thank you,
soukos


   

- Advertisement -