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
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.
To create credentials
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.
Continue reading...
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
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
Continue reading...