Skip to content

Commit 32960e4

Browse files
Merge pull request #34346 from rwestMSFT/rw-0606-fix-10110
Address formatting issues (PR 10110)
2 parents af74519 + 6f95c28 commit 32960e4

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

azure-sql/virtual-machines/windows/backup-restore-to-url-using-managed-identities.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Backup and restore to URL using managed identities
2+
title: Backup and Restore to URL Using Managed Identities
33
description: Learn how to back up and restore SQL Server databases to Azure Blob storage using managed identities for SQL Server on Azure VMs.
44
author: PratimDasgupta
55
ms.author: prdasgu
6-
ms.reviewer: vanto, mathoma
7-
ms.date: 02/16/2025
6+
ms.reviewer: vanto, mathoma, randolphwest
7+
ms.date: 06/06/2025
88
ms.service: azure-vm-sql-server
99
ms.subservice: security
1010
ms.topic: how-to
@@ -78,25 +78,45 @@ RESTORE DATABASE [AdventureWorks]
7878

7979
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.
8080

81-
```sql
81+
```output
8282
Msg 37563, Level 16, State 2, Line 14
8383
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).`
8484
```
8585

8686
### No `Storage Blob Data Contributor` role assigned
8787

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.
8989

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
91111
Msg 3201, Level 16, State 1, Line 31
92112
Cannot open backup device 'https://<storage-account-name>.blob.core.windows.net/<container-name>/AdventureWorks.bak'. Operating system error 5(Access is denied.).
93113
Msg 3013, Level 16, State 1, Line 31
94114
BACKUP DATABASE is terminating abnormally.
95115
```
96116

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.
98118

99-
```sql
119+
```output
100120
Msg 3201, Level 16, State 1, Line 31
101121
Cannot open backup device 'https://<storage-account-name>.blob.core.windows.net/<container-name>/AdventureWorks.bak'. Operating system error 5(Access is denied.).
102122
Msg 3013, Level 16, State 1, Line 31
@@ -107,7 +127,7 @@ RESTORE DATABASE is terminating abnormally.
107127

108128
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:
109129

110-
```sql
130+
```output
111131
Msg 1834, Level 16, State 1, Line 35
112132
RESTORE DATABASE AdventureWorks
113133
from URL = 'https://<storage-account-name>.blob.core.windows.net/<container-name>/AdventureWorks.bak'

0 commit comments

Comments
 (0)