Data Synchronization - Syncing Two Databases in SQL Server

Brad 0 Reputation points
2025-08-05T19:47:19.7333333+00:00

I'm needing to take one database and have it on two separate sql servers (in two different physical locations) and have it stay in sync. Is there a way that I can do this?

I've looked into SQL Server Replication

ie: https://learn.microsoft.com/en-us/sql/relational-databases/replication/tutorial-preparing-the-server-for-replication?view=sql-server-ver17

&

https://learn.microsoft.com/en-us/sql/relational-databases/replication/tutorial-replicating-data-between-continuously-connected-servers?view=sql-server-ver17

but this seems to just be updating the second server (subscriber) from changes made on the first server (distributor). I need it to work that way but also have changes made on the second server (subscriber) sync to the first server (distributor).

Any help is GREATLY appreciated.

Thanks!

SQL Server Database Engine
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 79,101 Reputation points Volunteer Moderator
    2025-08-05T21:32:15.7733333+00:00

    SQLServer does not support a distributed or cluster architecture. The best you can do is a read/write primary database with replicated readers.


  2. Erland Sommarskog 124.2K Reputation points MVP Volunteer Moderator
    2025-08-06T20:39:06.6366667+00:00

    Yes, this can be done. There are at least two ways to go within the realm of Replication:

    I have not worked with any, so I cannot answer any specific questions. But it goes without saying that it is a complex task. What if the same row is updated in both databases, how to deal with that?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.