Windows Azure SQL Database - Automated SQL Export - Perficient Blogs
  • Topics
  • Industries
  • Partners





Windows Azure SQL Database – Automated SQL Export

With the July updates/enhancements of Windows Azure some changes have been made to SQL Database. In this article I’m going to talk about Automated SQL Export. Previously you had to manually export your database for backup. Now you can automate the export/backup schedule. If you need a Windows Azure subscription here is the link for a free trial.

In this post I’m going to assume you are familiar with the Windows Azure management portal and have some familiarity with SQL Database, formerly SQL Azure. I’m also going to assume you already have a SQL Database running in Windows Azure. Once you login to the management portal select one of your databases, preferably one that may need this feature, then click the “Configuration” section.
You will see there is an option for “Export Status” which is now set to “None.” Select “Automatic” and you will see more configuration options. This is where you set up the backup schedule and storage account for your backups.
You get complete control of the schedule, as frequent as once a day. One thing to note is that the retention policy is not enforced if you have the “Always keep at least one export” option checked. You will need to give your credentials for the SQL Database server. Once you have all the options specified click “save” and now your database should create backups automatically based on the schedule you specified. After you have it configured it will store your backups in the specified storage account in a .bacpac file.
NOTE: Your SQL Database server will need to be set to allow Windows Azure Services. You can check this by going to the configuration section on your database server. Select “Yes” for Windows Azure services if it isn’t already selected.
When you check your storage account after the first scheduled backup completes you will see a container called “automated-sql-export”. This container will hold all of your backups. You can also navigate to the “Dashboard” of the database and look under the “Quick Glance” section to see the last time an export occurred.
So as you can see, it is fairly easy to setup automatic backups in Windows Azure for your SQL databases. If you want to cut costs while using this feature, there are several things to be aware of. You should use a storage account in the same region as your database so as not to incur network bandwidth charges. Also, this feature creates a copy of the database so that your backup is transactionally consistent. This means that you will be charged for the temporary copy of the database while it is exporting, and the copy will be removed once the export completes.  It is also recommended to not keep more exports than necessary so that you’re not paying for storage of the backups you no longer need. So if costs may be an issue, you might want to backup once a week vs. every day depending on your needs.

Leave a Reply

Subscribe to the Weekly Blog Digest:

Sign Up