How to Synchronize from SQL Azure to SQL Server using Visual Basic

26 January 2010 | Categories: Microsoft Sync Framework
Tags: , ,

When we introduced SQL Azure Data Sync, one of the primary goals was to reduce the complexity of getting started with synchronization using the Sync Framework.? Using the “SQL Azure Data Sync Tool for SQL Server” users can launch a wizard that configures synchronization from an existing SQL Server to a new SQL Azure database?

All of this is meant to give you a starting point for synchronization by automatically setting up the new tables in SQL Azure and build a synchronization relationship between the two databases.? In this wizard we also included an executable (SyncLocalSqlAzureDatabase.exe) that the SQL Agent process calls to execute synchronization on a scheduled basis.? But did you know that this executable is really just a very simple application that you can reproduce in about 10 lines of code??

But why would you want to do this when there is already a pre-built executable??? The best answers I think are in the case where you want to extend the funcitonality of this executable to get a better handle on events like conflicts and logging or even to embed the synchronization process into an existing application.? For example, by creating your own sync executable you can take the synchronization statistics that come back from the Sync Framework and store it to a custom logging table.? Or in the case of data conflicts you could choose to create your own conflict resolution method beyond the ones pre-built by the wizard.? Also using this technique you could add support for databases that do not have SQL Agent like SQL Express.

In?part 2 of Hilton Giesenow’s webcast series “How Do I: Integrate an Existing Application with SQL Azure?”, he walks through the process of adding the synchronization components to a new VB.NET application and executes? synchronization between a SQL Server and SQL Azure database that had previously been created using the “SQL Azure Data Sync Tool for SQL Server” (part of SQL Azure Data Sync) in about 10 lines of code.? He also shows how you can get access to events like conflicts and sync statistics (like # of rows uploaded and downloaded) to get you started exteding your sync executable.

Thanks Hilton, great work once again!

Liam Cavanagh

Microsoft Sync Framework @ Microsoft Sync FrameworkThe original post is created by: Microsoft Sync Framework


Comments

Leave a Reply:

Name *

Mail (hidden) *

Website





New Case Study – GoGrid and Blue Star Infotech

Sending Email Notifications Using SQL Azure Data Sync

How to Synchronize Multiple Geographically Distributed SQL Server Databases using SQL Azure Data Sync

Announcing SQL Azure Data Sync (November CTP) Available for Download

SQL Pass Conference & Synchronization to SQL Azure

SharePoint 2010, Windows 7 and PwC Now Integrate Microsoft Sync Framework v2.0

Connecting to Pre-Release Versions of SQL Server 2008

Connecting to Pre-Release Versions of SQL Server 2008 Part Deux

Checklist for Security of Data Recovery Service Providers

Professional Data Recovery Services

Data recovery firm lists its strangest cases

Data Recovery and File Recovery Tools


allQoo SEO Posts

Get Adobe Flash playerPlugin by wpburn.com wordpress themes