I am trying to connect my app to 2 database (Sql Server) in the same time but these Sql Server stay in different place one is a local server and another one stay online and they are the same ,same Tables ,same fields and same data/records so i use LinqToSql to mapping them and i want connect my app to retrieve the data from the server online but when i want delete or add a new record it should do the same operation in both server ,i mean save data on both sql server,so i ask if you have any help about how work out this feature .
Thanks so much for your atttention.
have a nice time.
Cheers
I would suggest that you investigate database mirroring. I’m not sure how (or if) it works in a local – remote setup, but it would be the easiest solution as there is no code involved.
If that doesn’t work or you aren’t interested in looking at that option, my second suggestion would be to write a seperate service to monitor your local database (independant of your original application) for changes and push those to your remote server. Google SQL Server Change Tracking for more information on this method.