Tuesday, February 21, 2012

Replication identity ranges

Any ideas!
I create a publication of one table with an identity range of 10
I create a subscription for this table with an identity range of 10
I use a new range percentage value of 50
At the publisher I can insert rows 1-19 (should be 1-5 ?)
At the subscriber I can insert rows 21-29 (should be 11-15 ?)
When the initial snapshot is created the next seed value alters to 30 and
when a merge is performed the publisher will insert rows 32-39 and the
subscriber will insert rows 42-49.
I have two observations.
1 the range percentage value does not seem to work at any value I try.
2. The ID values ending in 0 and 1 are always omitted regardless of what
identity ranges I try.
I am using SP3.
the ranges are updated every time a transaction is complete, so if you do an
update in a batch there will be no time for SQL server to adjust the ranges.
Normally you get a message saying that the indentity range is full. No
matter what value you put in here, if you do a batch the ranges will be
adjusted when the batch is complete. So you if you blow your percentage in a
batch, SQL will adjust it when the batch completes.
You should not adjust the indenty range on the Subscriber manually, it
should be done on the subscriber. Drop your subscriber, right click on your
publication, in the articles tab, click on the three ellipses to the right
of your article you wish to add identity range management to. Go to the
Identity Range tab. Make your changes here. If you do not do this, the range
on the subscriber will be blown away by the snapshot. Its not clear to me
from your post whether you did this or not.
"robham" <nospam@.co.uk> wrote in message
news:%23mC5FHiJEHA.3412@.TK2MSFTNGP09.phx.gbl...
> Any ideas!
>
> I create a publication of one table with an identity range of 10
> I create a subscription for this table with an identity range of 10
> I use a new range percentage value of 50
>
> At the publisher I can insert rows 1-19 (should be 1-5 ?)
> At the subscriber I can insert rows 21-29 (should be 11-15 ?)
>
> When the initial snapshot is created the next seed value alters to 30 and
> when a merge is performed the publisher will insert rows 32-39 and the
> subscriber will insert rows 42-49.
>
> I have two observations.
>
> 1 the range percentage value does not seem to work at any value I try.
>
> 2. The ID values ending in 0 and 1 are always omitted regardless of what
> identity ranges I try.
>
>
> I am using SP3.
>
|||Hilary,
I hope this explains it better.
Using the Enterprise Manager, I created table1 db1 on server1. This
contained two columns, tableid which is an identity column and descrip which
is a simple varchar column. I then created a publication of db1, checking
the identity ranges checkbox of the table article properties and assigning
values of 10 to the publisher and subscriber, and a value of 50 to the new
range column.
As soon as I created a subscription to repdb1 (using the create database
option) on server2 using a snapshot, the next identity seed value at the
publisher went from 20 to 30.
It was then I found that I could enter 19 rows into table1 (identity ranges
1-19) on db1 and 9 rows (identity ranges 21-29) in repdb1 before I needed to
start the merge agent.
This seems to have ignored the 50% range allowance. When I continued to
insert rows at db1 the identity range numbers went from 32-39 and at repdb1
they went from 42-49. Again this seems to have ignored the range allowance.
Advice please.
"robham" <nospam@.co.uk> wrote in message
news:%23mC5FHiJEHA.3412@.TK2MSFTNGP09.phx.gbl...
> Any ideas!
>
> I create a publication of one table with an identity range of 10
> I create a subscription for this table with an identity range of 10
> I use a new range percentage value of 50
>
> At the publisher I can insert rows 1-19 (should be 1-5 ?)
> At the subscriber I can insert rows 21-29 (should be 11-15 ?)
>
> When the initial snapshot is created the next seed value alters to 30 and
> when a merge is performed the publisher will insert rows 32-39 and the
> subscriber will insert rows 42-49.
>
> I have two observations.
>
> 1 the range percentage value does not seem to work at any value I try.
>
> 2. The ID values ending in 0 and 1 are always omitted regardless of what
> identity ranges I try.
>
>
> I am using SP3.
>

No comments:

Post a Comment