all groups > sql server replication > october 2006 >
You're in the

sql server replication

group:

Merging data from disconnected subscriber


Merging data from disconnected subscriber John Van Vliet
10/19/2006 7:54:01 PM
sql server replication:
I have a single publisher and ten partitioned subscribers using merge
replication. The subscription was accidentally removed from one of the
subscribers yesterday. There have been lots of inserts and updates on all
subscribers since the subscription was dropped.

A number of articles use identity columns but none of the identity ranges
have been exceeded on the dropped subscriber yet.

Is it possible to re-create the subscription?
If not, how can I merge the new data prior to creating a new subscription?
(I have tried inserting the new rows, but that fails because of an identity
range check on the publisher).

Re: Merging data from disconnected subscriber Paul Ibison
10/20/2006 12:00:00 AM
You can use Redgate's tools (Datacompare) for this and then do a nosync
initialization. To do the inserts, the tool will set identity _insert to on
so it'll be fine.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Re: Merging data from disconnected subscriber Hilary Cotter
10/20/2006 12:00:00 AM
You can also re-initialize the subscription (if its small) with the upload
the changes which occurred on the subscriber. This will keep all the changes
which occurred on the subscriber.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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]

Re: Merging data from disconnected subscriber John Van Vliet
10/20/2006 7:55:01 AM
I tried using Red-Gate's SQL Data Compare to merge the changes on the
publisher. It failed because the identity values were outside the publisher's
identity range. (This happens even with set identity_insert on).

I can't really do the inserts on the subscriber because it's 800km away.

I did consider making a new subscriber with the same partition on my dev
machine, merging on that subscriber, uploading the changes, and then
Re: Merging data from disconnected subscriber Hilary Cotter
10/20/2006 10:21:05 AM
oops. Look away, nothing to see here folks.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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]

Re: Merging data from disconnected subscriber John Van Vliet
10/20/2006 1:02:01 PM
Disabling the check constraint worked.
At first I tried to disable it using Management Studio, but that failed
because Management Studio tried to drop and then re-create the constraint.
Instead I used the following SQL:

ALTER TABLE <table> NOCHECK CONSTRAINT <constraint>

SQL Server seems to periodically check and re-enable the constraint, so I
Re: Merging data from disconnected subscriber Paul Ibison
10/20/2006 2:03:54 PM
Hi Hilary - in this case the subscription's already been dropped :(
Rgds,
Paul Ibison

Re: Merging data from disconnected subscriber Paul Ibison
10/20/2006 4:31:36 PM
You might get away with disabling the check constraint for the identity
insert then syncing the subscribers. Be worth doing in the test environment
and this is what I'd try first of all.
I don't quite follow your alternative solution - the subscriber which has
been dropped presumably has some data in it which needs uploading - how does
having a new subscriber solve the issue? Unless you're thinking of using the
subscriber database to copy it over the new subscriber? In this case I
believe it'll have the wrong generations.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

AddThis Social Bookmark Button