Azure Data Sync let’s you synchronize enterprise (on-premise) SQL Server (2005 and above) databases with SQL Azure databases – or several SQL Azure databases. There is a local agent and a cloud sync group service necessary for it to work.
This is the first preview from Nov 14 2011; let’s have a try.
In the management portal navigation tree go to Data Sync, select a subscription, a data center region,
You now have two options:
Let’s synchronize on-prem and a cloud SQL Azure database. The wizard leads you through the configuration of a sync group
Download and install the so called Sync Agent for the local server.
Then start the Data Sync Agent Preview from the start menu.
Now generate an agent key from the management portal and copy it into the local agent wizard.
Then register a SQL Server
to get
Back in the portal we add the agent to the Sync Group
Now we are half way through. Now let’s add an SQL Azure database:
Just creating a new SQL Azure database for this demo – and selecting it in Step 3 above.
In the following step (4) we configure the scheduling, and the conflict resolution (client or hub wins)
Select the on-premise SQL database
Click deploy now
Done!
Now, let’s see that it worked correctly. In the local Northwind database there are 2 people from Switzerland, add a row filter for Country = ‘Switzerland’. Then go the SSMS, connect the SQL Azure DB. There is a new dbo.Customers table now. Please also note the added tables for the change tracking. There are also some triggers and stored procedures added to your database. This may impact your runtime performance.
There are the 2 rows as expected:
That’s it again in the portal
This was actually super simple to setup. There are some best practices out there.
Negative point: there does not seem to exist an API or .NET library for scripted configuration and operation.