Share via


Tutorial: SQL Server Backup and Restore to Azure Blob Storage Service

Welcome to the Getting Started with SQL Server Backup and Restore with Azure Blob Storage Service tutorial. This tutorial helps you understand how to write backups to and restore from the Azure Blob storage service.

What You Will Learn

This tutorial shows you how to create a Windows Storage account, a blob container, creating credentials to access the storage account, writing a backup to the blob service, and performing a simple restore. This tutorial is divided into four lessons:

Lesson 1: Create Azure Storage Objects
In this lesson, you create an Azure storage account and a blob container.

Lesson 2: Create a SQL Server Credential
In this lesson, you create a Credential to store security information used to access the Azure storage account.

Lesson 3: Write a Full Database Backup to the Azure Blob Storage Service
In this lesson, you issue a T-SQL statement to write a backup of the AdventureWorks2012 database to the Azure Blob storage service.

Lesson 4: Perform a Restore From a Full Database Backup
In this lesson, you issue a T-SQL statement to restore from the database backup you created in the previous lesson.

Requirements

To complete this tutorial, you must be familiar with SQL Server backup and restore concepts and T-SQL syntax. To use this tutorial, your system must meet the following requirements:

  • An instance of SQL Server 2014, and AdventureWorks2012 database installed.

    The SQL Server instance can be on-premises or in an Azure Virtual Machine.

    You can use a user database in place of AdventureWorks2012, and modify the tsql syntax accordingly.

  • The user account that is used to issue BACKUP or RESTORE commands should be in the db_backup operator database role with Alter any credential permissions.

Additional Reading

Following are some recommended reading to understand the concepts, best practices when using Azure Blob storage service for SQL Server backups.

  1. SQL Server Backup and Restore with Azure Blob Storage Service

  2. SQL Server Backup to URL Best Practices and Troubleshooting