Add to collection
Expert User

Expert User

Verified

Configure backup of SQL Database in Azure Storage Account

Taking the backup of any SQL database in azure storage account

Please follow the below steps for configuring the backup of SQL databases in Azure storage account

Azure Portal

Step 1: First go to Storage Account

Step 2: Create Container

Step 3: Copy container URL from Properties of created container

Step 4: Copy Access key of Storage Account

SSMS

Step 5: Create credential in SSMS from the below 

Step 6: Run Backup query from the below or sql query saved in notepad


use master

GO

CREATE CREDENTIAL [SQLCredential] 

WITH IDENTITY = N'StorageName', 

SECRET = N'Access Key'

GO

BACKUP database   [master]

 TO URL=N'https://StorageAccount.blob.core.windows.net/ContainerName/master31082020.bak'

WITH  credential = 'SQLCredential',

NAME = N'master Database Backup',COMPRESSION

use master
GO
CREATE CREDENTIAL [SQLCredential] 
WITH IDENTITY = N'StorageName', 
SECRET = N'Access Key'
GO
BACKUP database   [master]
 TO URL=N'https://StorageAccount.blob.core.windows.net/ContainerName/master31082020.bak'
WITH  credential = 'SQLCredential',
NAME = N'master Database Backup',COMPRESSION

References and Credits

Comments 0

  • Sorry!! No comment posted yet. Become the first user to give comment.
Add a comment

Would you like to write for w3 sniff?

Become part of an amazing group of contributors and authors and start writing for us

Join Now
use master
GO
CREATE CREDENTIAL [SQLCredential] 
WITH IDENTITY = N'StorageName', 
SECRET = N'Access Key'
GO
BACKUP database   [master]
 TO URL=N'https://StorageAccount.blob.core.windows.net/ContainerName/master31082020.bak'
WITH  credential = 'SQLCredential',
NAME = N'master Database Backup',COMPRESSION
Feedback submitted successfully.