Blog Post

Data Architecture Blog
1 MIN READ

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

MUA's avatar
MUA
Icon for Microsoft rankMicrosoft
Oct 18, 2024

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

To create credentials

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

 

 

 

Updated Nov 07, 2024
Version 16.0
No CommentsBe the first to comment