Skip to main content
1 of 2
peter
  • 2.2k
  • 5
  • 19
  • 39

Default Constraints with Merge Replication

I am using merge replication in SQL 2012.

Why can't you mark default constraints as NOT FOR REPLICATION? You can disable all default constraints for a merge article, but it is all or nothing so it doesn't seem to offer enough control.

How about this scenario,

  1. The user inserts a record 'Shape' at a client
  2. The 'Shape' has a default constraint to set the NumberOfSides field to 4
  3. The client user edits the value of NumberOfSides and sets it to 5
  4. They sync with the server

When they sync with the server won't it repeat the default constraint and set the value of 'NumberOfSides' back to 4?

Am I missing something here?

I don't want to disable the default constraints being replicated to the client either because there are valid default values that need to be set. The client side user needs to have these values set to use the software.

peter
  • 2.2k
  • 5
  • 19
  • 39