2

RESTORE FILELISTONLY FROM URL = '' WITH CREDENTIAL = '' fails in SQL Server 2016.

Copied script from SQL Server 2012 environment, successfully restoring from Azure Storage Container, with create credential statement, and it failed in 2016.

Error message "Forbidden".

Only after logging into the Azure Portal, creating a Shared Access Signature for the container, could I execute the restore, and only by not specifying the credential did the restore work.

No documentation advises that a SAS (Shared Access Signature) is required in SQL Server 2016 for Azure container backup / restore.

Is there another way to use T-SQL to access blob backups on Azure storage containers in SQL Server 2016, than using SAS?

MSDN - SQL Server Backup to URL SQL Server 2016

Looking at the MSDN tutorial on how to configure the backup service SQL 2016 introduces, a SAS is used. Refer MSDN Tut on SQL 2016 backup service

1
  • Things have changed in a year - refer blogs.msdn.microsoft.com/sqlcat/2017/03/10/… ~ are attempting to back up to a page blob (given that you use WITH CREDENTIAL). Striped backups are only supported for block blobs. To use block blobs, you need to create a Shared Access Signature (SAS), and create a credential for the SAS. There are examples in learn.microsoft.com/en-us/sql/relational-databases/…. So if you backup with CREDENTIAL its BLOB storage if you use SAS it's BLOCK storage.
    – Alocyte
    Commented Nov 14, 2017 at 10:53

1 Answer 1

1

RESTORE FILELISTONLY FROM URL = '' WITH CREDENTIAL = '' WORKS in SQL Server 2016 IF your blob resides in a container in Storage Account (CLASSIC)... Then Ola Hallengren's scripts work, and the world makes sense... even encryption works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.