none
hai all

    Question

  • consider a scenario where in replication, when the publisher database gets unavailable, that time we can insert/update/delete data into subscriber database i think. Now my question is what all the data modifications we do in subscriber database how will it gets sync to the publisher databases in replication?

    thanks in advance.

    Saturday, July 20, 2013 6:33 PM

Answers

All replies

  • Depends on the type of replication you're referring to. If you're using Merge replication then changes on either end will be sync'd without any special setup, but if it's Transaction replication then those changes to the subscriber database won't be replicated back to the publisher. There may be ways to get transaction replication going in both directions but that would require additional work.
    Sunday, July 21, 2013 6:40 AM
  • Hi venkat,

    In replication, when the publisher database gets unavailable, there are some suggestions to get sync from the subscriber database to the publisher databases.

    1. We can back up the subscriber database and copy the backup to the publisher and restore it there with a different name than the publication database name. And then configure the replication again.
    2.  If this is merge replication and the backup you have of the publisher database is within the retention period, merely restore it with the keep_replication switch. The Subscriber will backfill the publisher with missing rows.

    There is a similar issue about restoring the publisher database from a subscriber backup, we can review the following link.
    http://social.technet.microsoft.com/Forums/en-US/7ab38545-de0e-4809-9863-eac2a477a10c/restoring-the-publishing-database-from-a-subscriber-backup

    Thanks,
    Sofiya Li

    Sofiya Li
    TechNet Community Support

    Monday, July 22, 2013 5:33 AM
  • Publisher in replication is your main database and subscriber is replicated database. We are not sure of which replication you are using. But my suggestion is NOT to update the article in subscriber unless there is a valid reason. First point is that your subscriber may or may not be taken as publisher. Because, you may be altering your key table indexes in subscriber to boost the performance for queries running on subscriber. Hence considering your subscriber later as publisher, your queries might hurt. It all depends how do you use your subscriber and the replication strategy you configured. 

    First of all, you need to find what stops your replication and act on it. 


    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Monday, July 22, 2013 6:01 AM
  • For snapshot replication the subscriber side changes will be overwritten.

    For transactional replication they may be overwritten if they were updates, if they were inserts or deletes they might cause the distribution agent to fail with a consistency error problem.

    For merge replication the subscriber side changes will be merged with the publisher or logged as conflicts as long as you are in the retention period.


    looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

    Monday, July 22, 2013 1:27 PM