• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 34
  • Last Modified:

Real time syncrhonization of transactions of two database servers

I have a mobile application connecting to a database and would like to do the following.

- Detect the IP address.  If it's within certain range, it will connect to the database server A in country A.  Else, it will connect to the database server B in country B.
- Since the some applications may write data to database of server A and some to that of server B.  I would like to synchronization the changed data on both side in real time.  How can I do that if I'm using MS SQL server?

Many thanks.
2 Solutions
For your first question, you would need to use a Geography based dns service using something like GeoAware or AnyCast DNS. This would handle the balancing of traffic to each server based off location. You can check out http://dyn.com/dns/network-map/ or http://www.dnsmadeeasy.com/ for services.

To handle the synchronization your best bet would be to use SQL Server Replication between the two servers. This would allow your clients to update and see real time information on either server. http://technet.microsoft.com/en-us/library/ms151198.aspx
Deepak ChauhanSQL Server DBACommented:
You can take the advantage of updatable subscription of transactional replication. But this option will not be longer supported in future version of sql server.

If you are using sql server 2005/2008/2008R2 then you can configure it through GUI(using new publication wizard) but not in SQL server 2012. However this option is deprecated in sql server 2012 but still supported and can be configure by using T-sql scripts as new publication wizard does not provide this option.

Also you can consider Peer to Peer replication for the same.

For throughout information please check the below link.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now