I try use the Microsoft.Synchronization.SyncOrchestrator.Synchronize() for Mirror my source database instance To my destination database(using sql server 2014, VS 2017).
Always I can see successfully end of Synchronize(), When the Synchronization is First time.
But After I change the scopeName , Sometimes The Synchronize() function don't end, never.
When the Source Database is small(around 10mb), the Synchronize() was ended successfully, after minutes with changing scopeName.
But When the Source Database is large(around 3gb), the Synchronize() was not ended never.
Is there problem the Microsoft.Synchronization framework with Bigger database ?
There is No Any Exception Message, just never end.
My PC is notebook - with inter i5 2.5GHz and 8GB Ram.
Dim scopeName As String = "TheScopeName"
'after end of first syncro, I will do again syncro Just change the scopeName.
'
Dim SourceConnectionString As String
Dim TargetConnectionString As String
SourceConnectionString = s_src
TargetConnectionString = s_dst
Dim sqlServerConn As SqlConnection = New SqlConnection(SourceConnectionString)
Dim sqlAzureConn As SqlConnection = New SqlConnection(TargetConnectionString)
Dim myScope = New DbSyncScopeDescription(scopeName)
'.....get table list for syncro...
'
Dim sqlServerProv As SqlSyncScopeProvisioning = New SqlSyncScopeProvisioning(sqlServerConn, myScope)
If (sqlServerProv.ScopeExists(scopeName) = False) Then
sqlServerProv.Apply()
End If
Dim sqlAzureProv As SqlSyncScopeProvisioning = New SqlSyncScopeProvisioning(sqlAzureConn, myScope)
If (sqlAzureProv.ScopeExists(scopeName) = False) Then
sqlAzureProv.Apply()
End If
Dim syncOrchestrator As SyncOrchestrator = New SyncOrchestrator
syncOrchestrator.LocalProvider = New SqlSyncProvider(scopeName, sqlAzureConn)
syncOrchestrator.RemoteProvider = New SqlSyncProvider(scopeName, sqlServerConn)
syncOrchestrator.Direction = SyncDirectionOrder.UploadAndDownload
syncOrchestrator.Synchronize()