I need help with MS Sync Framework as I am new in it. I have tried the simple synchronization between two same tables in 2 different databases. The code I used from MS Sync tutorial http://msdn.microsoft.com/en-us/library/ff928494.aspx.
When I try to Apply the provisioning on the server side I get the exception
ALTER DATABASE failed because the READ_COMMITTED_SNAPSHOT and the ALLOW_SNAPSHOT_ISOLATION options cannot be set to ON when a database has FILESTREAM filegroups. To set READ_COMMITTED_SNAPSHOT or ALLOW_SNAPSHOT_ISOLATION to ON, you must remove the FILESTREAM filegroups from the database. ALTER DATABASE statement failed.
public void CreateProvisioningOnServer()
{
// create a connection to the SyncExpressDB database
SqlConnection clientConn = new SqlConnection(@"Data Source=.\SQLEXPRESS2008; Initial Catalog=SyncDB; Trusted_Connection=Yes");
// get the description of ArticlesScope from the SyncDB server database
DbSyncScopeDescription scopeDesc = SqlSyncDescriptionBuilder.GetDescriptionForScope("ArticlesScope", serverConn);
// create server provisioning object based on the ProductsScope
SqlSyncScopeProvisioning clientProvision = new SqlSyncScopeProvisioning(clientConn, scopeDesc);
if (clientProvision.ScopeExists(scopeDesc.ScopeName))
return;
// starts the provisioning process
clientProvision.Apply();
}
I am using FILESTREAM option for the SQL Server 2008 Express edition for storing images, so I cannot use the MS Sync Framework as it is and I MUST override somehow the SqlSyncScopeProvisioning?
Next question I have
I am using the MS Sync Framework for synchronization between 2 Databases, both in Express Edition.
The client side will download data from 16 server tables - tables structure same. The client side will upload data to 4 server tables - maybe little different tables structure on client and server.
Is it good way which I want to go to use the MS Sync Framework? I have always made such synchronization by my own Stored Procedures - but there was the performance issue (and also others), when the synchronization with clients DBs via internet and linked servers is very inefficient.
So which way to go?