Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Replication (2005)
 Merge Replication Identity Ranges

Author  Topic 

AlanDNelson
Starting Member

7 Posts

Posted - 2008-04-05 : 21:03:24
I have a database table with a simple identity column. As a starting point... when I run the following queries... this is what I get:

SELECT Max(AliasID) FROM Account_Managers
1300006

DBCC CHECKIDENT ('Account_Managers')
Checking identity information: current identity value '1300006', current column value '1300006'.


Now... I set up merge replication, with the plan of allowing SQL Server to manage my identity ranges for me. I set up my ranges to be 100000 on the publication, 100000 on the subscriber, with a threshold of 80.

I would EXPECT to see the constraint
([AliasID]>(1300006) AND [AliasID]<=(1400006)) on the publisher and
([AliasID]>(1400006) AND [AliasID]<=(1500006)) on the subscriber.

However... what I do get is:

([AliasID]>(1300006) AND [AliasID]<=(1400006) OR [AliasID]>(1400006) AND [AliasID]<=(1500006)) on the publisher and

([AliasID]>(1500006) AND [AliasID]<=(1600006) OR [AliasID]>(1600006) AND [AliasID]<=(1700006))


Can anyone tell me why I get the OR... which essentially makes my identity ranges twice as large as they should be?

Thanks in advance.

- Alan D. Nelson

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-04-05 : 21:52:19
How many servers involved? In case of two servers, you can let one server use odd number (seed = 1, step = 2) while the other use even number (seed = 2, step = 2).
Go to Top of Page

AlanDNelson
Starting Member

7 Posts

Posted - 2008-04-06 : 11:13:29
It is just 2 for now, but we've got plans to add more as we get more sites. I don't think we want to get locked into any particular number of servers.
Go to Top of Page
   

- Advertisement -