Failed to Restore SQL Managed Instance Database Backup from Azure Blob Storage

  • Thread starter Thread starter MUA
  • Start date Start date
M

MUA

If you encounter issues while restoring an Azure SQL Managed Instance database from Azure blob storage, ensure that your database backup files are correctly stored in Azure blob storage.



Error: 1

Cannot open backup device 'https://mystorageaccount.blob.core.windows.net/test_container/db_backup/mytest_db_01.bak'. Operating system error 86(The specified network password is not correct.).

RESTORE DATABASE is terminating abnormally.




Cause of failure

The blob storage credential is either incorrect or missing.




To validate credential

I am utilizing managed identity, but the same approach applies to all identity types. SQL managed instance managed identity Storage Contributor and Storage Blob Data Contributor is require.







select * from sys.credentials









MUA_0-1729214396216.png



To create credentials







Code:
USE master
GO
CREATE CREDENTIAL [https:// mystorageaccount.blob.core.windows.net/db_backup/]
WITH IDENTITY='Managed Identity'
GO









Error: 2

Cannot open backup device 'https://mystorageaccount.blob.core.windows.net/test_container/db_backup/mytest_db_01.bak'. Operating system error 12007(failed to retrieve text for this error. Reason: 317).

RESTORE DATABASE is terminating abnormally.




Cause of failure

The storage account's public network access is disabled, relying solely on a private endpoint. However, the private endpoint was either configured incorrectly or associated with the wrong DNS zone, leading to connectivity issues. The private endpoint for blob storage must be created with privatelink.blob.core.windows.net Private DNS zone.



To validate private endpoint DNS configuration

Navigate Storage account > Network > Private Endpoint > Click Private Endpoint > Setting > DNS configuration.

  • FQDN: mystorage.privatelink.blob.core.windows.net
  • Private DNS Zone: privatelink.blob.core.windows.net



MUA_2-1729214648404.png

Continue reading...
 
Back
Top