Monday, March 26, 2012

Replication Disrupting Other Access

We have setup merge replication on a production server/database that
is also used for our web applications. We need the replication for
disconnected computing using an MSDE database. The replication works
exceptionally well, however, we had to publish ID ranges on the tables
so that data could be merged with the server correctly. This has
caused a problem with our web based applications. Once the end of the
ID range is reached, our other applications cannot insert data into
the tables without resetting the ranges or removing replication.
Has anyone else seen this problem? If so, is there a good work-around
to allow both entities to co-exist using the same database? We would
like to avoid adding a significant amount of code/scripts to manage
this automatically. Would we be better off to use a snapshot method
of replication and insert data directly from that?
Thanks for any suggestions you may have.
Dan Broomall
Dan,
there are 2 ways I can think of:
you can use large ranges - so large in fact that no new ranges are required,
or you can select to manually manage the ranges and select a simple
algorithm that ensures there is never any overlap between publisher and
subscriber(s). EG if you have a publisher and a single subscriber, the
publisher could have a seed of 1 and increment of 2 while the subscriber has
a seed of 2 and increment of 2 - the publisher has odd identity values and
the subscriber evens.
HTH,
Paul Ibison

No comments:

Post a Comment