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

image

Click on “New Sync Group” to define a new Sync Group

image

enter the name of the Sync Group and click on Database combo and select “Register New SQL Azure Database…”

image

Once selected this option, SQL Azure Database registration screen will popup

image

Specify the SQL Azure server name, Database name, User name and password and click “Test” to test the connection and then click “Save”

image

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”

image

Once completed adding the Hub and Sync Members, click “Next” to proceed

image

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

image

To synchronize the databases initially, click on “Sync Now” button

image

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

image

To view the detailed log for each task, click on “View Log”

image

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

image

In the Edit screen, you add additional Sync Members, you can change the Sycnhronization direction

image

You can schedule the sync job to run on specific intervals of time

image

After select the schedule, click on “Save”, Now your sync job will automatically run every 15 minutes once or as per your schedule definition

image

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 !!!

Advertisement

Author: Arunraj

I am a Microsoft Certified Technology Specialist (Database Developer). I work on SQL Server programming since SQL Server 7.0 specializes in SQL Server Programming and Performance Tuning and has 14 years of hands-on experience. I hold a Master Degree in Computer Applications. I am also part of NJSQL User Group and Northern New Jersey .Net User Group.

One thought on “SQL Azure Sync CTP2 – How to Synchronize SQL Azure with On Premise SQL Server and vice versa–Create Sync Groups and Schedules – Part 2”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: