2

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.

  • 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. – Jonathan Fite Jul 24 '19 at 3:17
0

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

enter image description here

You need to use Classic and Standard.

| improve this answer | |
0

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

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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