Is there anybody clear about the identity management in merge/transactional replication

  • I am confused by the identity range auto management in SQL Server 2005. for example, if I configure the publisher range sive to 10, and configure the subscriper range size to 5, and range threshold percentage 80.

    question:

    1. If I insert data in Publisher side continuiosly, and no data inserted in the subscriber side, what kind of identity will apear

      1,2,...10,11,... Continously?

    2. Publisher,  has inserted 1,2,3 and then insert one records in Subscriper

       what's the begining one of this subscriper

    3. after the publisher inserted 10 records and reached the top limits, what's the number for next range.

  • I think that what is happening is that the distributor is controlling the allocation of ranges. When a subscriber is created the distributor looks for the next free number (one for each identity being managed) and allocates it to the subscriber by reseeding the relevant identity value. It then resets a constraint on the subscriber to preventy the identity value exceeding the new seed value plus the range size that you assigned to that identity field. During replication the current seed value in the subscriber is compared against it's constraint to see if it has exceeded the threshold and, if so, the process is repeated. The same logic also applies to the publisher.

    In other words you cannot predict what ranges will be assigned to a subsicriber/publisher as it is done dynamically and just depends on the order that sets of ranges are doled out.

    Perhaps someone else can expand further on this?

    Regards

    David Saville

    Aldex Software Ltd.

    http://www.aldex.co.uk

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

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