locked
SQL Server database backup to blob storage using SAS RRS feed

  • Question

  • Hi all,

    I am trying to backup an on-premise database to Azure Blob Storage. I succeeded by using the access key of the blob using:

    CREATE CREDENTIAL [CredentialName]  
    WITH IDENTITY = 'AzureStorageAccountName'
       , SECRET = 'AzureStorageAccountKey'
    GO

    BACKUP DATABASE [DatabaseName]
      TO URL = 'https://AzureStorageAccountName.blob.core.windows.net/BlobName/BackupFileName.bak'
      WITH CREDENTIAL = 'CredentialName'
      , COMPRESSION
    GO

    ==> Which means connectivity is ok.

    When I try to do the backup using a Shared Access Signature like this:

    CREATE CREDENTIAL [https://AzureStorageAccountName.blob.core.windows.net/BlobName]
      WITH IDENTITY = 'SHARED ACCESS SIGNATURE'
    , SECRET = 'SharedAccessSignature'
    GO

    BACKUP DATABASE [DatabaseName]
      TO URL = 'https://AzureStorageAccountName.blob.core.windows.net/BlobName/BackupFileName.bak'
      WITH COMPRESSION
    GO

    I get:

    Operating system error 50(The request is not supported.).
    Msg 3013, Level 16, State 1, Line 4
    BACKUP DATABASE is terminating abnormally.

    Do you have any idea of what could go wrong ?
    (I tried to re-create the SAS multiple times, ...)

    Wednesday, November 28, 2018 4:24 PM

All replies

  • Hello Guillaume Fraiture,

    To fix this error message, I would request you to try the steps mentioned in the article here & here to perform the backup operations using SAS method. Ensure that you add the all permissions in the access policy. Let us know if you have any further assistance.

    • Proposed as answer by YASWANTH MADI Thursday, November 29, 2018 11:32 AM
    Thursday, November 29, 2018 11:32 AM
  • You can find this information in another link which might help you to configure it.

    https://blogs.technet.microsoft.com/msftpietervanhove/2016/02/05/backup-to-azure-with-credential-deprecated-or-sas-token/


    -kccrga http://dbatrend.blogspot.com.au/

    Thursday, November 29, 2018 11:49 AM
  • Tried every suggestion, still no luck (yet).

    Rem: I am able to access the blob via SAS with Azure Storage Explorer


    Thursday, November 29, 2018 12:54 PM
  • Guillaume, is your Firewall up on your storage account ? If yes, can you test it while it is down then put it back up ?
    Thursday, November 29, 2018 10:09 PM