Groups | Blog | Home
all groups > sql server replication > june 2005 >

sql server replication : determine the assigned identity range


tedcorpus NO[at]SPAM hotmail.com
6/27/2005 2:24:31 PM
Is there any way to find out a subscriber's assigned identity range (at the
publisher)?
It would be helpful to have an idea where a row was added from its identity
value.

Hilary Cotter
6/27/2005 9:15:33 PM
No, it only maintains the last range assigned - which will be the highest
one.

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
[quoted text, click to view]

Paul Ibison
6/28/2005 12:00:00 AM
In the distribution database, MSrepl_identity_range holds the next ranges,
so You'll have to work with the metadata tables on the subscribers for this:

You could use this type of query:
SELECT sysobjects.name AS TableName, *
FROM MSrepl_identity_range INNER JOIN
sysobjects ON MSrepl_identity_range.objid =
sysobjects.id

The data from each subscriber could be amalgamated at the publisher using
linked servers,

Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

TCorp
7/5/2005 2:11:30 PM
Thanks!
So I could compare max_identity/current_max columns across servers
(accounting for the range value). But linking the servers just for this
purpose might be more administration work than benefit at this point.

[quoted text, click to view]

Hilary Cotter
7/5/2005 7:36:14 PM
You only need to look at the max value on the publisher's distribution
database. That will be the next assigned range.

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
[quoted text, click to view]

AddThis Social Bookmark Button