Configure backup of SQL Database in Azure Storage Account
Expert User
Verified
Taking the backup of any SQL database in azure storage account
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
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
Comments
Leave a Comment