SQL Server 2005 Replication Integrity Violations SQL Server, Error number: 28549

1.1k Views Asked by At

I am hoping someone can help me with a really bizarre problem.

When users sync their device they are getting this error:

The row operation cannot be reapplied due to an integrity violation. Check the Publication filter. [ Table = ASSET_DETAIL,Operation = Insert/Update,RowGuid = {C92038E4-18EA-EE11-4C9F-2952CDECFCC7} ] HRESULT 0x80040E2F (28549)

When we go to the server and query this row and its parent row (table is called Asset) appears to be valid and correct. When we explore the full filter tree (for want of a better description) all the data appears to be correct.

From what we can see in our DB the data which should be going to the subscriber obeys the referential integrity constraints in place in your DB. It also obeys the publication filter too.

Is there a reason why we would getting this problem on the subscriber? And how can we resolve this?

Also, is it possible to log exactly what data is being sent to device - if not data, the statements being run against the sdf file to identify how is happening?

Thanks in advance for your help,

Morrislgn

3

There are 3 best solutions below

0
On

Not sure if this is technically an answer, but it is the answer to the problem we were having.

We discovered that a colleague had deleted a FK relationship in our DB and neglected to tell anyone about it. So when we were looking at the DB and the data everything was ok.

It was only when we compared the schema to our test version that we realised what had happened.

So, the answer in this case was to verify the schema with a separate DB.

2
On

Commands are typically applied at the subscriber through stored procedures. Run a profiler when your subscriber reconnects to see what's running and with what parameters. That might give you a clue as to what's happening. I can't be more specific, unfortunately.

0
On

Has it got anything to do with using the 'Not For Replication' Clause on your constraint. See http://msdn.microsoft.com/en-us/library/ms180843.aspx or http://msdn.microsoft.com/en-us/library/ms152529.aspx

So when using replication say of OrderHeaders and OrderLines, the replication may insert the OrderLines in your subscriber before the Orderheader record and then you get the violation.

Specifying Not For Replication means that the checks on constraints are not made when the rows are inserted via the replication system as they have already been made at the publisher.