Azure SQL Database – Beginner’s Guide to Replication

azure-sql-databasesql server

We have SQL Azure database running with our website. However today's outage of SQL Azure give us a setback. And now we are looking a way to replicate [as I read on internet] is best to do have 2 database running in some sort of fault tolerance mode. Well, Frankly I didn't know much of terminology or don't have much knowledge. I am software developer and can just manage 100-200MB Database.

Now, my question/request is what we can do to ensure that if one SQL Azure DB is down then we can back our site on other database, which is same, with almost latest data from main database.

I try to search on internet, but most of article use terminology that I hardly understand them. Maybe some wise word will help me find direction. Thanks.

Best Answer

Traditionally SQL Server relied on technologies like SQL Server Replication, Log Shipping or Change Data Capture/Change Tracking to replicate data across multiple locations. Unfortunately none are available in SQL Azure. Instead SQL Azure has the SQL Data Sync feature:

SQL Data Sync (Preview) is a service of SQL Database that enables you to synchronize the data you select across multiple SQL Server and SQL Database instances. To synchronize your data you create sync groups which define the databases, tables and columns to synchronize as well as the synchronization schedule. Each sync group must have at least one SQL Database instance which serves as the sync group hub in a hub-and-spoke topology.

At this time SQL Data Sync is in preview and has some known limitations.

Also SQL Azure does offer backup/restore and export/import features, see Windows Azure SQL Database Backup and Restore, but these are all 'copy everything' solutions, not 'copy only what is changed'.

A possible solution is to switch to SQL Server on Windows Azure, which gives you a traditional SQL Server instance capable of doing all the technologies above, and you can have it replicate data to a SQL Server hosted on Amazon EC2. See Provisioning a SQL Server Virtual Machine on Windows Azure.