3

I am trying to restore database on the Azure SQL Managed Instance using Azure blob container URL.

Reference

CREATE CREDENTIAL [https://zzdevbackup.blob.core.windows.net/dbbackup] 
WITH IDENTITY = 'SHARED ACCESS SIGNATURE'
, SECRET = 'sv=2017-11-09&ss=b&srt=sco&sp=rwdlacg=XzzcvDrhcmdldnfQ9Opu4M4Kqq1MT3tsxOADiRCQBf%2BXo%3D'

RESTORE FILELISTONLY FROM URL = 
   'https://zzdevbackup.blob.core.windows.net/dbbackup/Azure_Data_Sync_Test.bak'

RESTORE DATABASE [Azure_Data_Sync_Test] FROM URL = 'https://zzdevbackup.blob.core.windows.net/dbbackup/Azure_Data_Sync_Test.bak'

I am getting the below error

Msg 3201, Level 16, State 2, Line 7
Cannot open backup device ‘https://ZZZdevbackup.blob.core.windows.net/dbbackup/Azure_Data_Test.bak’. Operating system error 2(The system cannot find the file specified.).

Please help me to figure out this issue.

1
  • Does the RESTORE FILELISTONLY work? When the secret was created did you give it a long enough time to live? I think the default is one day, you need to increase that before you generate the secret. Commented Jul 24, 2019 at 3:17

2 Answers 2

1

I had the same issue. It fixed after re-creating the container with the new access level

enter image description here

1
  • 1
    this saved me tons of time, thank u. this wasn't mentioned anywhere in the documentation!!!
    – lnshi
    Commented Apr 15 at 2:36
0

Please make sure you created the storage account as shown below:

enter image description here

You need to use Classic and Standard.

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.