Autonumber field in Subscribers getting different numbers

  • Hi Guys

    I have a situtaion like this: (Merge Replication on Sql Server 2005)

    Publihser and 3 Subscriber on Sql Server 2005 and 1 subscriber on Sql server 2000.

    In one table there were data before and on that i have a column with primary key on it with Autonumber.

    If I want to insert a row in one subscriber, the autonumber generate a different sequece of number on that subscriber (say like 240039, 240040..) and another subscriber generate a another unique sequenece of number.. (20040, 20041..) and so on with another subscribers.

    Could you please help me out to get the unique auntonumber seeded by 1 if insertion will be done on any subscriber? (like 1001, 1002, 1003...) disregard of any subscriber insertion.

    Thanks a lot for your suggestions in Advance.

    Jas Gogia

  • There is a very good reason they every subscriber has it's own identity range. In most cases the Identity column is also a primary key, which must be unique.

    If you would start all subscribers with 1, you would get an error when the differnt servers are synchronized that you try to enter a duplicate key.

    By giving each subscriber it's own range you avoid these type of errors.

    [font="Verdana"]Markus Bohse[/font]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply