Sql Server Replication: Snapshot vs Merge

Posted by Zyphrax on Stack Overflow See other posts from Stack Overflow or by Zyphrax
Published on 2010-05-26T12:05:54Z Indexed on 2010/05/26 12:11 UTC
Read the original article Hit count: 222

Filed under:
|
|
|

Background information
Let's say I have two database servers, both SQL Server 2008.
One is in my LAN (ServerLocal), the other one is on a remote hosting environment (ServerRemote).

I have created a database on ServerLocal and have an exact copy of that database on ServerRemote. The database on ServerRemote is part of a web application and I would like to keep it's data up-to-date with the data in the database ServerLocal.

ServerLocal is able to communicate with ServerRemote, this is one-way traffic. Communication from ServerRemote to ServerLocal isn't available.

Current solution
I thought it would be a nice solution to use replication. So I've made ServerLocal a publisher and subscriptions are pushed to the ServerRemote. This works fine, when a snapshot is transfered to ServerRemote the existing data will be purged and the ServerRemote database is once again an exact replica of the database on ServerLocal.

The problem
Records that exist on ServerRemote that don't exist on ServerLocal are removed. This doesn't matter for most of my tables but in some of my tables I'd like to keep the existing data (aspnet_users for instance), and update the records if necessary.

What kind of replication fits my problem?

© Stack Overflow or respective owner

Related posts about sql

Related posts about server