You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a primary managed identity isn't assigned to the SQL Server on Azure VM, the backup and restore operations will fail with an error message indicating that the managed identity isn't selected.
80
80
81
-
```sql
81
+
```output
82
82
Msg 37563, Level 16, State 2, Line 14
83
83
The primary managed identity is not selected for this server. Enable the primary managed identity for Microsoft Entra authentication for this server. For more information see (https://aka.ms/sql-server-managed-identity-doc).`
84
84
```
85
85
86
86
### No `Storage Blob Data Contributor` role assigned
87
87
88
-
If the primary managed identity for the SQL Server on Azure VM isn't given the `Storage Blob Data Contributor` role to the storage account, the **BACKUP** operation will fail with an error message indicating that access is denied.
88
+
If the primary managed identity for the SQL Server on Azure VM isn't given the `Storage Blob Data Contributor` role to the storage account, the `BACKUP` operation will fail with an error message indicating that access is denied.
89
89
90
-
```sql
90
+
```output
91
+
Msg 3201, Level 16, State 1, Line 31
92
+
Cannot open backup device 'https://<storage-account-name>.blob.core.windows.net/<container-name>/AdventureWorks.bak'. Operating system error 5(Access is denied.).
93
+
Msg 3013, Level 16, State 1, Line 31
94
+
BACKUP DATABASE is terminating abnormally.
95
+
```
96
+
97
+
If the managed identity for the SQL Server on Azure VM isn't given the `Storage Blob Data Contributor` role to the storage account, the `RESTORE` operation will fail with an error message indicating that access is denied.
98
+
99
+
```output
100
+
Msg 3201, Level 16, State 1, Line 31
101
+
Cannot open backup device 'https://<storage-account-name>.blob.core.windows.net/<container-name>/AdventureWorks.bak'. Operating system error 5(Access is denied.).
102
+
Msg 3013, Level 16, State 1, Line 31
103
+
RESTORE DATABASE is terminating abnormally.
104
+
```
105
+
106
+
### Network or firewall issues
107
+
108
+
If you haven't configured valid network access to the Azure Blob storage, and Windows Firewall permissions on the host, to allow the outbound connection, and valid storage account service endpoints aren't configured, the `BACKUP` operation fails with an error message indicating that access is denied.
109
+
110
+
```output
91
111
Msg 3201, Level 16, State 1, Line 31
92
112
Cannot open backup device 'https://<storage-account-name>.blob.core.windows.net/<container-name>/AdventureWorks.bak'. Operating system error 5(Access is denied.).
93
113
Msg 3013, Level 16, State 1, Line 31
94
114
BACKUP DATABASE is terminating abnormally.
95
115
```
96
116
97
-
If the managed identity for the SQL Server on Azure VM isn't given the `Storage Blob Data Contributor` role to the storage account, the **RESTORE** operation will fail with an error message indicating that access is denied.
117
+
If you haven't configured valid network access to the Azure Blob storage, and Windows Firewall permissions on the host, to allow the outbound connection, and valid storage account service endpoints aren't configured, the `RESTORE` operation fails with an error message indicating that access is denied.
98
118
99
-
```sql
119
+
```output
100
120
Msg 3201, Level 16, State 1, Line 31
101
121
Cannot open backup device 'https://<storage-account-name>.blob.core.windows.net/<container-name>/AdventureWorks.bak'. Operating system error 5(Access is denied.).
102
122
Msg 3013, Level 16, State 1, Line 31
@@ -107,7 +127,7 @@ RESTORE DATABASE is terminating abnormally.
107
127
108
128
When the original database with the same name exists in the storage, the backup of a new database to the same storage path will fail with the following error:
109
129
110
-
```sql
130
+
```output
111
131
Msg 1834, Level 16, State 1, Line 35
112
132
RESTORE DATABASE AdventureWorks
113
133
from URL = 'https://<storage-account-name>.blob.core.windows.net/<container-name>/AdventureWorks.bak'
0 commit comments