Search code examples
sql-serverazuressmsazure-sql-managed-instanceazure-managed-database

Azure SQL Managed Instance: RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3201)


I'm trying to restore my database into Azure SQL Managed instance from blob storage URL. But I'm getting below error.

RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3201)

I tried to restore it to localhost and that worked fine. Blob storage is having all the permissions.

Why is it working in localhost and not in Azure SQL managed instance.

enter image description here


Solution

  • Cannot open backup device '******' operating system error 5 (Access is denied)

    This can because of it not able to access the storage account.

    To access data from outside of the virtual network in Managed instance public endpoint for a managed instance helps you to achieve that. By default, it is Disabled turn it to Enable.

    enter image description here

    And also confirm that you enable public network access in storage account from all networks.

    enter image description here

    Also see,

    For more information refer,

    Backup and restore SQL Server to Azure Blob storage

    Troubleshooting potential backup/restore issues on Azure SQL Managed Instance