Lesson 3: Write a Full Database Backup to the Windows Azure Blob Storage Service
This lesson demonstrates the use of tsql statement to perform a full database backup to Windows Azure Blob storage service.
Perform a Full Database Backup to the Windows Azure Blob Storage Service
To create a full database backup, use the following steps:
Connect to SQL Server Management Studio.
In the Object Explorer, connect to the instance of SQL Server 2012.
On the Standard menu bar, click New Query.
Copy and paste the following example into the query window, modify as needed, and click Execute.
BACKUP DATABASE[AdventureWorks2012] TO URL = 'https://mystorageaccount.blob.core.windows.net/privatecontainertest/AdventureWorks2012.bak' /* URL includes the endpoint for the BLOB service, followed by the container name, and the name of the backup file*/ WITH CREDENTIAL = 'mycredential'; /* name of the credential you created in the previous step */ GO
In the object explorer, connect to Azure Storage. Browse to find the container and the newly created backup files.
For other tsql and C# code examples on database backup, see Examples.