I am trying to sync 2 SQL Server databases. The scenario is that I have 2 PCs which have identical SQL Server database (both databases have the same structure and schema) and connected to the internet.
Now, I want to have a simple Windows application developed in C# and installed on both PC that may have a 'Sync' command button and clicking on that it calls a WCF service hosted on a web server which then sync data in both databases.
Please suggest the solution.
Try looking at merge replications or maybe better Sync Framework 2.1. Using WCF is not the way you want to go.
Related
I have two databases in SQL Server 2016 Express, one on the server and the other is local. I want to sync data from the local to the server database every day, one way.
I could not use replication or log shipping because SQL Server edition is Express.
I found the MS Sync framework could help but it is too old.
What is the latest technology for doing that?
Azure SQL Data Sync feature may be a very easy solution for your goal. Take a look at https://learn.microsoft.com/en-us/azure/sql-database/sql-database-sync-data
If you want the data synched not once per day but simultaneously, you could have a look at Microsoft Sync Framework 2.1. https://www.microsoft.com/de-ch/download/details.aspx?id=23217
I've used it over a custom WCF service, but I think you can use it directly with db connections.
I have already searched many times but did not find a suitable solution. I am developing a WPF application. I am using SQL Server as database on my local machine.
I have a cloud SQL Server database (AWS or Microsoft Azure etc).
Now the thing I want to achieve is that I want my local machine's database to keep syncing (backing up) data with the cloud database automatically so that I do not have to worry about data loss if something happened to my local machine, since I will always have a copy of database in the cloud.
Is there any way to achieve this?
I would try Replication and MS Sync framework.
Replication:
https://msdn.microsoft.com/en-us/library/ms151198.aspx
Sync Framework:
http://social.technet.microsoft.com/wiki/contents/articles/2190.tutorial-synchronizing-sql-server-and-sql-server-compact-sync-framework.aspx
I have a WP7 app idea that requires a connection to a server database (running SQL Server 2008 R2). I checked online and accordingly it is usually done by using WCF that expose the database for the phone to be used.
I would like to know if the new mango update provide anything new to the process I already mentioned. I am aware of the local database, but in my case I need the SQL Server database for the bigger size.
Thanks,
(Even in mango) there is no way to directly connect to a SQL Server database.
The easiest way is to use oData to expose your database on the wire. The oData client library is built into the Mango APIs under System.Data.Services.Client.
However, be aware of the requirements of your application and architect approrpriately. There may be a need to provide some sort of caching plan as network connectivity is never guaranteed on a mobile device.
I have a desktop application (C# .NET 3.5) that uses a SQL server for it's database. I have had a request from the client, however, to make it possible to export the database as it stands, and be able to use it on a laptop without connectivity. They understand that updates to the parent server will not be reflected in these offline clients.
Is there a way I can just save the DataSet's to a binary form and write them to a disk and send those files to the offline clients.
There is an entire line of tools and technologies covering this case, namely the Synch Framework. See Synchronizing Databases. See Getting Started: Client and Server Synchronization for a starting example involving a SQL Server Compact Edition file on the client (.SDF file) that is synchronized with a SQL Server central database. Note that the client won't install anything else other than you application, the SQL Server CE is just a few in-process DLLs that you distribute with your app, nothing nearly as complex as a SQL Express edition on the client.
The good news is that Synch Framework no only allows the client to get their own on-the-go snapshot of the database, it actually allows for changes applied while disconnected to be merged back into the central site.
You could either use Compact Edition (aka. SDF files), or you can save the datasets as XML using the built-in method.
Can't you just take a SQL Server level backup and have them install e.g. SQL Server Express on their laptops and restore the database there?
That way you wouldn't have to do anything special in your app at all - just change the connection string to point to the local SQL Server Express instance, and off you go! No mucking around with serialized data sets and stuff......
I am configuring a new environment to run several intranet web applications. I have 2 servers, one will be the SQL Server 2008 server, and the other will be the IIS server. I also need to install SQL Server Reporting Services. I am not sure whether it would be better to run reporting services on the database server, or web server. Is there a best practice for this situation?
Depends...
The reporting services rendering is fairly processor intensive so you need to keep that in mind. Typically if I'm designing a system with heavy load or throughput requirements I place the reporting services instance on its own server. The best practice is really dependent on the complexity of your system.
If a third server is not an option and the two servers you already have are similarly speced I would probably place it on the one with the lowest processor load. If you place the reporting server on the web server make sure that Reporting services uses your dedicated database server for the reporting services meta-data so that you don't have to install the RDBMS on both machines.
You need to keep in mind that if you don't place the reporting server on the same box as SQL server you will need another SQL Server license. The product is only "free" if it is installed on the same machine as SQL.
I would run installer on your web server so that the web service components of Reporting Services are installed there.
It is also benificial to configure reporting services with it's own application domain in IIS so that you can tweak the configurations independant of say your other web applications.
When you run through setup using the Reporting Services Configuration Tool, set up the database on your non web server (i.e. dedicated db server). This way all your data processing is handled on one server and all your web processing/data rendering is handled on another.
Hope this is clear and of use but please feel free to pose further questions.
Cheers,John