I have a web based CRM system that stores all the client data from all the clients into one database (MS Sql Server). We need to build a system that maintains a local copy of the data for each client. So basically the client database will have all tables and columns except for the ClientId that is in ever server table. I am aware that I will need to add fields to the server to support synchronization.
Are there any good solutions or components already out there to help me accomplish this?
We are using MS Sql Server and .NET C#
SQL Server vs. a local one (express) - this is what MS does in it's CRM.
Sync framework (part of SQL Server etc.) could be helpful to programming a sync mechanism, in case you do not want to use replication here - which MAY work.
Related
We have Sitecore 9.0 production server which has two MSSQL database. Environment is setup with AWS (VM) on premises MSSQL database. We want to replicate all database from one sql server (master,core,shared,reporting etc..) to another sql server.
How to replicated AWS VM on premises sitecore 9.0 databases?
check this link
https://doc.sitecore.com/developers/90/platform-administration-and-architecture/en/scale-databases.html
For Sitecore there should be only 1 master database. Also there should be only 1 CM Server active (exception are possible with config in the picture it is named cold so that looks good).
To stay close to the drawing which is not necessarily the best solution. Alternative options are certainly possible especially for the web databases. An option is to have a High Availability database, SQL server always on. See Sitecore Configure SQL server always on and see Support for SQL Server scaling features for the other options if data loss or long recovery time is allowed.
SQL server always on is basically the Supported by Sitecore option on VM's. For Database Mirroring: This feature will be removed from Microsoft SQL Server in the future. It is recommended to use AlwaysOn Availability Groups instead.
I have a ADO.net application which generates some data in regular intervals that is stored in a local SQL server. I want that database to sync with Microsoft azure SQL database automatically. What would be the best process to make it happen?
You have two options. One of them is SQL Data Sync which will sync you local database with an Azure SQL Database and viceversa. It is a bi-directional replication that works best with SQL Server 2008 R2 (and later) on-premises databases. This service is in preview and you can get started with it by visiting this documentation.
Your second option is Snapshot and one-way replication that works with SQL Server 2012 and later. You can get started with it on this documentation.
Hope this helps.
I have a web-server and a database server. There is a WCF service on the web-server and a website using it. Website requests the data from the WCF service and WCF service connects to the database server, fetches the data and returns it to the website.
To optimize this process and decrease the calls to WCF service I decided to manually cache the data on the web-server. One option I can think of was Microsoft Sync Framework. But then I realized that I have to create a sync framework by myself to achieve my objective. Because Microsoft Sync Framework does not provide any option for my kind of process. My process will be actually like this:
Website requests the data.
Business logic of the website checks whether it is available on the compact edition (sdf) database in the website's App_Data folder.
If present, fetch the data from the compact edition.
If not present, connect to WCF service and fetch the data from main database server and copy it to the compact and then fetch from compact edition.
So what I want to ask, is this technique efficient? and if YES is it there any alternative way to quickly achieve this technique? Or I have to code all of it manually?
It could work, but if it was me, and my goal was the increase performance/cache the calls between your web server and a back-end sql server, I wouldn't choose sql server compact edition for caching purposes.
Something like redis or memcached might be a more appropriate/higher performance way to increase performance of your caching layer. The compact sql server may cut down on the number of calls to your back-end server, but it might do that at the expense of slower response times overall.
It could be efficient in some circumstances, but I could propose you to use presreve data cache in local SQL Server Express instead of Compact.
The type system of SQL Server Compact is different then SQL Server. I know that EF6 support both but I would not start this journey on my own...
In any case there should be reasons why you need to work with cache throwgh RDBMS..
You can also use NHibernate, 2nd level caching. For more information, read this article http://www.codeproject.com/Articles/529016/NHibernate-Second-Level-Caching-Implementation. It will store data in the MemCache, and detect changes to records.
Another caching technology, is AppFabric, and you can see more details here : http://msdn.microsoft.com/en-us/library/ff383731(v=azure.10).aspx
By using memcache performance can be increased.
These are the steps to implement the memcache
You have to create a window service that will retrieve data from database and store in memcache in JSON format as (key value pair).
For website create a handler file as an API that will retrieve data from memcache and display the result.
I have implemented this in one of my project it retrieves thousands of data in milliseconds
We have multiple client operating the same software application which has same database structure on their individual PCs. All the clients are offline and at different locations (Not connected by LAN etc.)
Is it possible that, each client pc collects its own data and then server can restore client's back up and get updated with each of the clients data. By updating/restoring the data on server should be merged with all the client's data, so that server admin can view activity at each client side.
I hope I am clear.
Thank you very much in advance.
Regards.
Edit: We will be using SQL Server Express 2008 Edition.
As #Dennis mentioned you could use Microsoft Sync Framework.
Synchronization is a non-trivial task because of many factors like conflict handling, change detection, timestamp synchronization.... The Microsoft Sync Framework does that all for you.
There are several other Frameworks that do synchonization. See OpenSync or SymmetricDS.
I have one central SQL Server database which can be offline from time to time. I have a desktop application using Local DB Cache (SQL CE) to synchronize with the central database and I also have a web application with its own SQL Server that I'd also would like to keep synchronized. All synchronizations must be bidirectional.
Is there a way to synchronize my central database with web application's database in the same way as I synchronize my central database with desktop client?
I know about collaboration scenarios and peer-to-peer synchronization but I would like to avoid manual provisioning of databases. I'd like to use integrated sql server 2008 change tracking just like in the SQL CE <--> SQL Server scenario.
I had the same question once: sync framework server to server synchronization
In the end i did the syncronization myself(using stored procedures) and it wasn't that hard. Or you can use replication(in my project there was a term to use as little traffic as we can, so i've implemented my own mechanism for my needs)