Search code examples
sql-server-2008merge-replication

How to Use an Int ID in merge replication


I am going to be using merge replication in SQL 2012 for offline clients who can synchronise their data.

The merge replication process adds a guid to each table that is being replicated, but I am wanting to know how to add an additional int id as well?

For instance our clients ring up the support desk and they have to identify a particular record they don't want to have to deal with guids.

An identity column would be ideal, but how would this work with replication? Would each site have to have a different identity range?


Solution

  • The answer is here,

    https://dba.stackexchange.com/questions/18807/what-happens-when-identity-range-isexceeded

    Basically each client is given two ranges. Once they have used up the first range and they sync they will be given a new range.

    An error is thrown if an insert occurs in a table that has exceed both ranges. The only way this could happen is if a user inserts 2000 records before doing a sync. The range size can be increased if this is likely.