SQL Azure Sync CTP2 – How to Synchronize SQL Azure with On Premise SQL Server and vice versa–Create Sync Groups and Schedules – Part 2
In the last post, we saw how to download, install the SQL Azure Sync Agent and configure it
In this post, we will see how to Create a Sync Group to include SQL Azure database and SQL Server On premise database, Synchronize them, and create a schedule to run them automatically.
Login to https://datasync.sqlazurelabs.com using your Azure account
Click on “New Sync Group” to define a new Sync Group
enter the name of the Sync Group and click on Database combo and select “Register New SQL Azure Database…”
Once selected this option, SQL Azure Database registration screen will popup
Specify the SQL Azure server name, Database name, User name and password and click “Test” to test the connection and then click “Save”
Click “Add” to add the database to Member List and click on “Set Hub” to specify it as main server
Again click on Database combo and select the On Premise database and click “Add”
Once completed adding the Hub and Sync Members, click “Next” to proceed
Select the table you want to Sync from “Available Tables” list and then click on Right Arrow to move to “Selected Tables”
Once done selecting the tables, click on “Create Sync Group”
To synchronize the databases initially, click on “Sync Now” button
Once the sync process starts, it will automatically redirect to “Sync Logs” tab, you can filter the logs by Sync Group and Database.
For initial sync, you will see 3 tasks, Provisioning of SQL Azure database for sync, Provisioning of SQL Server for Sync and then Sync the data
Once the tasks are completed, the Task state icon will change from Execution state to Ready State
To view the detailed log for each task, click on “View Log”
If you see the text marked showed in Yellow, it shows the total number of records downloaded.
Now we have successfully defined a Sync group and synchronized the data from SQL Azure and SQL Server bidirectional,
Let us now setup the Sync Group as a scheduled job
Click on “Sync Groups” and then select the Sync Group and click on “Edit”
In the Edit screen, you add additional Sync Members, you can change the Sycnhronization direction
You can schedule the sync job to run on specific intervals of time
After select the schedule, click on “Save”, Now your sync job will automatically run every 15 minutes once or as per your schedule definition
Now you might be wondering, How the Sync Service identifies the changes made to data, Let us see that in the next post.
I hope you all find this post useful. Please post your comments !!!