Backup a SQL Server Database from On-Premises to Azure Storage

Olujimi Adebiyi 0 Reputation points
2024-02-05T13:13:05.9033333+00:00

Hi there,

Hope you having a better start to the week than mine ...

I am trying to backup an on-prem Sql database to an Azure storage and I have followed the steps highlighted below

  1. Created a storage account.
  2. Created and Azure access policy
  3. Generated the Shared Access Signature (SAS) from the Portal.
  4. Created Credential using SAS Token.
  5. Perform backup of the database using Backup to URL command

The thing is the query keeps running for a long time that I am forced to cancel the cancel it then shows an abort error message as well as the true message which is below here

Am I missing some sort of permission somewhere?

Thanks in advance for any suggestions

Cannot open backup device  system error 50
IF NOT EXISTS  
(SELECT * FROM sys.credentials   
WHERE name = 'https://xxxxxxxx.blob.core.windows.net/xxxxxxxxbkup')  
CREATE CREDENTIAL [https://xxxxxxxx.blob.core.windows.net/xxxxxxxxbkup] 
   WITH IDENTITY = 'SHARED ACCESS SIGNATURE',  
   SECRET = 'si=xxxxxxxxbkup_&spr=https&sv=2022-11-02&sr=c&sig=9nhsgwskshdsjsgsgshsgsh3D';  


    BACKUP DATABASE DatabaseName  
TO URL = 'https://xxxxxxxx.blob.core.windows.net/xxxxxxxxbkup/xxxxxxxx_backup.cobak'
WITH   --credential ='https://xxxxxxxx.blob.core.windows.net/xxxxxxxxbkup',
COPY_ONLY, 
--NAME = N'DataHosting_Claremont-Full Database Backup',
COMPRESSION,  
STATS = 1

Error Message
Msg 3201, Level 16, State 1, Line 73
Cannot open backup device 'https://xxxxxxxx.blob.core.windows.net/xxxxxxxxbkup/xxxxxxxx_backup.cobak'. Operating system error 50(The request is not supported.).
Msg 3013, Level 16, State 1, Line 73
BACKUP DATABASE is terminating abnormally.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.