Backup to URL in Azure
The scenario is describing about how to take the backup from the SQL Server in Azure Virtual machine and store the backup file of particular database in Azure Container.
SELECT * FROM sys.credentials DROP CREDENTIAL [https://123storages.blob.core.windows.net/123container] GO USE master GO CREATE CREDENTIAL [https://123storages.blob.core.windows.net/123container]--this link you find in the continaer properties WITH IDENTITY = 'Shared Access Signature'--This shouble alwas shared access signature.Dont change the value /*the below value came from Shared access signature of continer.*/ /*Use Container Shared access signature instead of Storage access signature.*/ ,SECRET='sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-19T18:52:52Z&st=2021-06-19T10:52:52Z&spr=https&sig=Tgt6H8qXTKVroVkEqmHUk2ruP8HFnk%2FsN%2BeHMP18tVQ%3D'; -- Access key GO BACKUP DATABASE TEST2 TO URL = N'https://123storages.blob.core.windows.net/123container/TEST2.bak'
Comments