Does Merge Replication Delete Data & Re-Insert

  • I had tried Merge Replication. But due to some problem (supposedly connection problems)... some tables got replicated but at one point of time when the replication failed ... it had deleted data from the server (from where I was pulling data). Why did this happen... does merge replication firstly delete all data and then re-inserts all data.

    Paras Shah

    Evision Technologies

    Mumbai, India


    Paras Shah
    Evision Technologies
    Mumbai, India

  • Do we need an empty database to set up Merge Replication or can we setup merge replication on an existing database with data in it?

    Replication is failing on the end where I have a database with data in it?

    What should I do?

    Paras Shah

    Evision Technologies

    Mumbai, India


    Paras Shah
    Evision Technologies
    Mumbai, India

  • No, it does updates, though you can override this and request the insert/delete behavior. If you have any doubts about whats going on, profile it!

    Andy

  • You know, I've always set it up with an empty db so I don't know the answer for sure - but you definitely can with transactional, you just skip the snapshot step. With merge this would mean the possibility that you'd be out of sync from the start (well, this applies to transactional as well, but not if log reader running from the start).

    Are you sure that you need merge? I prefer transactional with immediately updating subscribers, not quite the same functionality but pretty close.

    Andy

  • The problem that I faced while using transactional repliaction was that I could not insert new records into the subscriber db (target db). I am setting up 2 way replication what is the best way that I can achieve it.

    quote:


    You know, I've always set it up with an empty db so I don't know the answer for sure - but you definitely can with transactional, you just skip the snapshot step. With merge this would mean the possibility that you'd be out of sync from the start (well, this applies to transactional as well, but not if log reader running from the start).

    Are you sure that you need merge? I prefer transactional with immediately updating subscribers, not quite the same functionality but pretty close.

    Andy


    Paras Shah

    Evision Technologies

    Mumbai, India


    Paras Shah
    Evision Technologies
    Mumbai, India

  • You mean you wanted to be able to insert records into the subscriber and have them appear on the publisher as well? If so, you have a few choices:

    1) Obviously merge is the most common way to do this.

    2) Transactional with immediately updating/queued updating subscribers. Still retains the transactional model but lets subscribers make changes.

    3) Roll your own. Do the inserts on the subscriber, then you have to go back and do the inserts on the publisher AND block them from replicating back to the subscriber via a filter - otherwise you'll get a primarykey violation. Updates...oh, you'll have fun implementing that!

    1 & 2 are both good choices for your situation. I'd suggest experimenting with both before deciding.

    Andy

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply