Entire local database sync with sql azure

久未见 提交于 2019-12-06 13:29:34

You can use SQL Data Sync Tool.

SQL Data Sync is a feature of Windows Azure SQL Database.

With SQL Data Sync you can synchronize selected data through a Windows Azure SQL Database instance.

SQL Data Sync supports synchronizations within or across Windows Azure data centers.

SQL Data Sync also supports hybrid configurations of SQL Database instances and on-premises SQL Server databases.

The SQL Data Sync service is free.

For more details check ScottGu's Blog Post under "SQL Data Sync" sub topic.

I hope this will help to you.

if you're using Sync Framework, you have to tell it explicitly which tables (or even columns) to actually sync.

  Dim clientProvision As SqlSyncScopeProvisioning = New SqlSyncScopeProvisioning(clientCon, syncScope)


                            If Not (clientProvision.ScopeExists("Scope_" + tableName)) Then
                                clientProvision.Apply()
                            End If

                            Dim serverProvision As SqlSyncScopeProvisioning = New SqlSyncScopeProvisioning(serverCon, syncScope)

                            If Not (serverProvision.ScopeExists("Scope_" + tableName)) Then
                                serverProvision.Apply()
                            End If

                            Dim syncOrchestrator As New SyncOrchestrator()

                            ' Create provider for SQL Server
                            Dim clientProvider As New SqlSyncProvider("Scope_" + tableName, clientCon)

                            ' Set the command timeout and maximum transaction size for the SQL Azure provider.
                            Dim serverProvider As New SqlSyncProvider("Scope_" + tableName, serverCon)

                            ' Set Local provider of SyncOrchestrator to the onPremise provider
                            syncOrchestrator.LocalProvider = clientProvider

                            ' Set Remote provider of SyncOrchestrator to the azureProvider provider 
                            syncOrchestrator.RemoteProvider = serverProvider

                            ' Set the direction of SyncOrchestrator session to Upload and Download
                            syncOrchestrator.Direction = SyncDirectionOrder.UploadAndDownload


                            'Dim thread As New Threading.Thread(Sub() ShowStatistics(syncOrchestrator.Synchronize(), tableName))
                            'thread.Start()
                            ShowStatistics(syncOrchestrator.Synchronize(), tableName)

You can use SQL Database Migration Wizard (SQLAzureMW) for that.

It is an open source application.

You can use it to migrate your SQL database to and from Windows Azure SQL Database.

SQLAzureMW has a user interactive wizard that walks a person through the analysis / migration process.

For get more details about SQL Database Migration Wizard

I hope this will help to you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!