SQL Database Replication....

lidds

Well-known member
Joined
Oct 19, 2004
Messages
122
Programming Experience
Beginner
I need some advise from the group.

I have developed a piece of software that uses MS SQL Server to store my application database. My software can be used by companies that have multiple offices in different countries, and this is fine as they write back to the SQL database in one of the locations. However I have one specific company who is using my software in both Toronto and Mumbai, the database is located in Mumbai. Normally this would not be a problem apart from the connection from Toronto to Mumbai has a 200ms latency. As you could imagine this causes huge response problems when they run my software from Toronto. What I want to be able to do is do some kind of database replication, therefore there would be an SQL database in both Toronto and Mumbai and you would connect to the database in your location. Doth of these databases would need to have read write access to them. What I then want to happen is any changes to the tables whether deletions, inserts or updates to also be replicated in the other location. I have already thought of a way to control which location has access to certain records. therefore stopping both locations from modifying the same record.

My question is how I can do this? Does MS SQL Server have this functionality already built in, the company is using MS SQL Enterprise? What would I have to change to my currently table structures to enable this to work?

Any help advise would be really appreciated.

Simon
 
It's really up to the DBA to set-up the databases for Replication. As for your app, it's not necessarily an issue for people to edit the same record because Replication can handle the merging I believe. The main issue would be insertion of new records. If you want to use auto-generated IDs then you must either specify a range of IDs for each site or else use GUIDs so that new values don't clash. I would suggest that you d a bit of reading about SQL Server Replication and what it means for developers.
 
Back
Top