1

I'm setting up a merge replication web publication for a table that needs to use the DateTime (Later Wins) conflict resolver so that the most recently modified row wins in any conflict. This table (and hundreds of other tables) use a datetimeoffset for their modified date as subscribers can be in many timezones. In order to get the required datetime value as a column I've added a ModifiedDateUTC datetime computed column which does a simple CONVERT to a datetime. The issue I'm seeing is that even though the article setup accepts this as a valid column, whenever I generate a conflict I get the error 'The specified conflict resolution column 'ModifiedDateUTC' could not be found.'

5
  • There should not be a confligt - this computed column should not be replicated at all.
    – TomTom
    Commented Apr 11, 2018 at 16:00
  • If the computed column is not replicated, then it doesn't make it to the subscriber. I'm intentionally generating conflicts (in other columns) to verify the resolver is working as intended.
    – Jason
    Commented Apr 11, 2018 at 16:13
  • But it still akes no sense because it can be reliably computed on the subscriber.
    – TomTom
    Commented Apr 11, 2018 at 16:18
  • The resolver runs at the publisher (supposedly by IIS) in web based merge replication. But you're right that it makes no sense, the computed column shows up in the conflict table without an issue,and is available at both the subscriber and the publisher. It should just be an easy comparison to decide which row wins.
    – Jason
    Commented Apr 11, 2018 at 16:19
  • Did you ever think there might be too many sub.stackexchange sites? ugh.
    – Jason
    Commented Apr 11, 2018 at 16:27

1 Answer 1

0

The problem is that replicate dcolumn drop from replicating. Then replicatinon of object (views, store procedures and function) fail in creating subscription. Then this column should e added manualy to table. Then after part wwich create object you should remove calculated column becaus ebcp fail with field to big error. Then after removal bcp pass. But you don't have calculate column on subscriber. But now you can do that only through publisher. Then you should drop calculate column (but this is problem if you have FK otr index on it because you shoul drop them to). Then recreate calculated column (and recreate FK and index (index manualy on subscribers too). This is not normal.

Calculated column (persisted) should be replicated by definition (SQL staements) always in creation of snapshot and only not field with bcp and realy replicated data.

1
  • 2
    You have a lot of typos in your answer. Please fix those so it's easier to understand what you mean. Commented Feb 25, 2021 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.