Synchronizing two databases that belongs to different networks - c#

I'm new to the to Sync Framework, I have done basic prototyping on it and all went ok. However, I have a scenario where I need to synchronize two databases that belongs to separate network. I have done my part of educating myself by browsing thru several websites and most discussions were of two databases with direct connections. Do you have any existing prototypes that tackles synchronization between to MS SQL 2008 R2 DB servers that belongs to separate networks? Any help from you would be greatly appreciated.

you can find samples using WCF here:
Database Sync: SQL Server and SQL Compact N-Tier with WCF
Database Sync:SQL Server and SQL Express N-Tier with WCF
Windows Azure Sync Service Sample
Walkthrough of Windows Azure Sync Service Sample
I would recommend the Azure Sync Service Sample since this has a corresponding walkthrough. if you're not using SQL Azure, just ignore the Azure related codes/deployment steps.

Related

How do you create a SQL server for asp on azure?

I have an asp website with a SQL server that for some reason doesn't get passed along when I publish the solution. How do I get a SQL server running on azure? I've looked it up and tried following a couple of tutorials but there doesn't seem to be a whole lot of information on it.
To get an SQL server running on Azure, you have two solutions :
PaaS solution with Azure SQL Database
IaaS solution by using an SQL server Instance on a dedicated virtual machine
Here is a nice link explaining benefits and limitations of both solution.
Regards

Easy way to keep two SQL Servers synced if you have read only access to publisher (source) of data

I am making C# app that rely on data from one old SQL Server 2005 machine.
Since I have only acces to read only data from that server, I need to build up some kind of handmade replication.
My app is going to use SQL Server 2012 and I am planing to read data from old SQL server in nightly tasks.
Before I start reinventing the well for sync data between two SQL Servers, I'll love to try to find some kind of library or system which can do the JOB.
Unfortunately I can't just setup replication between two SQL Servers because source of data is at SQL Server 2005 version and I do not have admin rights on that server.
I just need few tables to keep sync (updated) at my new SQL Server.
Is there some kind of embedded replication which can be called from code, and which have no needs for writing and admin access to publisher database?

Synchronize data between two sql server 2008 database with ado.net sync framework

I have search but i can not get how to use ado.net sync framework.
can any body give me example code or samples ..or can share links that provide samples code of ado.net sync framework used for two sql server 2008 database Synchronization.
I did synchronization a while ago and I used following tutorials
Synchronizing SQL Server and SQL Express, although this one is between SQL Server and SQL Express but it will work just fine between two SQL Servers.
Solution of some problems I faced can be found here
Overview of how database synchronization works
In summary you need to do following
Provision Server database (only once)
Provision Client database (only once)
Do Synchronization

Local Application Remote Database

This is outside my usual domain so please forgive my ignorance.
I am developing a Windows(7) plugin in C# for a local application that will query a database, returning the results to the application(simple). The issue is people can work from home so if I use a MS SQL Express database (as I usually would) it would be exposed on the internet and I have read an MS SQL server exposed to the internet is often compromised quickly.
I could install the database with the plugin, but I believe that would make managing the database, updates and troubleshooting a nightmare as there would be 15 separate deployments.
Can anyone suggest approaches to take to have a plugin for a local application that queries a remote database and is not a massive security liability or speak to the security of an internet accessible sql express delpoymeny?
Thanks
First post on stack overflow, I did search for answers prior to posting.
Usually you will want some type of web services layer between your database and the remote clients.
In this case you would have a web app that exposed certain service calls. The calls should require some type of authentication and perform the necessary actions on the database.

.net queue system

I am building a system which is made up of 2 application
ASP.Net Website where jobs will be created for engineers to visit data held in central database
Windows Forms Application running on Laptop where jobs will be synced from central database then a form is completed and data sent back to the central database.
What will be the best way to transfer the data, the laptops will be remote and may be on a slow connection.
I will be using SQL Server 2008, Entity Framework, .Net 4
I have looked at the Microsoft Sync Framework but unsure if this will do whats required, also thought about having a web service where the windows form client can pull and push data to.
I have had bad experiences with MSMQ so what to avoid this.
How would you approach this?
Take a look at merge replication for SQL Server. This would allow your laptop users to make changes to the data they've received while offline and later sync back to the central database.
I believe MS Sync framework is designed to handle just this problem. While you can use MSMQ, you'd be writing most of the logic to do the syncing yourself. Sync framework should give you a better abstraction and take care of most of the details.

Categories