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?