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
Copy file name to clipboardExpand all lines: docs/relational-databases/tutorial-use-azure-blob-storage-service-with-sql-server.md
+43-32Lines changed: 43 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: "Tutorial: Use Azure Blob Storage with SQL Server"
4
4
author: WilliamDAssafMSFT
5
5
ms.author: wiassaf
6
6
ms.reviewer: randolphwest
7
-
ms.date: 08/11/2025
7
+
ms.date: 11/06/2025
8
8
ms.service: sql
9
9
ms.topic: tutorial
10
10
ms.custom:
@@ -15,7 +15,7 @@ ms.custom:
15
15
16
16
[!INCLUDE [sqlserver 2016 and later versions](../includes/applies-to-version/sqlserver2016.md)]
17
17
18
-
This tutorial helps you understand how to use the Azure Blob Storage for data files and backups in SQL Server 2016 and later versions.
18
+
This tutorial helps you understand how to use the Azure Blob Storage for data files and backups in [!INCLUDE [sssql16-md](../includes/sssql16-md.md)] and later versions.
19
19
20
20
Support for Azure Blob Storage in SQL Server was introduced in [!INCLUDE [sssql11-md](../includes/sssql11-md.md)] Service Pack 1 CU2, and enhanced in later versions. For an overview of the functionality and benefits of using this feature, see [SQL Server data files in Microsoft Azure](databases/sql-server-data-files-in-microsoft-azure.md).
21
21
@@ -25,7 +25,7 @@ This tutorial shows you how to work with SQL Server data files in Azure Blob Sto
25
25
26
26
To complete this tutorial, you must be familiar with [!INCLUDE [ssNoVersion](../includes/ssnoversion-md.md)] backup and restore concepts and T-SQL syntax.
27
27
28
-
To use this tutorial, you need an Azure storage account, SQL Server Management Studio (SSMS), access to an instance of SQL Server on-premises, access to an Azure virtual machine (VM) running an instance of SQL Server 2016 or later version, and an [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] database. Additionally, the account used to issue the `BACKUP` and `RESTORE` commands should be in the **db_backupoperator** database role with **alter any credential** permissions.
28
+
To use this tutorial, you need an Azure storage account, SQL Server Management Studio (SSMS), access to an instance of SQL Server on-premises, access to an Azure virtual machine (VM) running an instance of [!INCLUDE [sssql16-md](../includes/sssql16-md.md)] or later version, and an [!INCLUDE [sssampledbobject-md](../includes/sssampledbobject-md.md)] database. Additionally, the account used to issue the `BACKUP` and `RESTORE` commands should be in the **db_backupoperator** database role with **alter any credential** permissions.
29
29
30
30
- Get a free [Azure Account](https://azure.microsoft.com/offers/ms-azr-0044p/).
31
31
- Create an [Azure storage account](/azure/storage/common/storage-quickstart-create-account?tabs=portal).
@@ -70,12 +70,12 @@ To create a policy on the container and generate a Shared Access Signature (SAS)
70
70
71
71
```powershell
72
72
# Define global variables for the script
73
-
$prefixName = '<a prefix name>' # used as the prefix for the name for various objects
74
-
$subscriptionID = '<your subscription ID>' # the ID of subscription name you will use
75
-
$locationName = '<a data center location>' # the data center region you will use
73
+
$prefixName = '<a prefix name>' # used as the prefix for the name for various objects
74
+
$subscriptionID = '<your subscription ID>' # the ID of subscription name you will use
75
+
$locationName = '<a data center location>' # the data center region you will use
76
76
$storageAccountName = $prefixName + 'storage' # the storage account name you will create or use
77
-
$containerName = $prefixName + 'container' # the storage container name to which you will attach the SAS policy with its SAS token
78
-
$policyName = $prefixName + 'policy' # the name of the SAS policy
77
+
$containerName = $prefixName + 'container' # the storage container name to which you will attach the SAS policy with its SAS token
78
+
$policyName = $prefixName + 'policy' # the name of the SAS policy
79
79
80
80
# Set a variable for the name of the resource group you will create or use
81
81
$resourceGroupName = $prefixName + 'rg'
@@ -102,7 +102,7 @@ To create a policy on the container and generate a Shared Access Signature (SAS)
:::image type="content" source="media/tutorial-use-azure-blob-storage-service-with-sql-server/29-thousand-rows.png" alt-text="Screenshot of the SSMS results showing a row count of 29,939.":::
@@ -380,18 +386,22 @@ To restore a database to a specified point in time from file snapshot backup set
380
386
381
387
```sql
382
388
-- restore and recover to a point in time between the times of two transaction log backups, and then verify the row count
383
-
ALTERDATABASE AdventureWorks2022 SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
389
+
ALTERDATABASE AdventureWorks2022
390
+
SET SINGLE_USER
391
+
WITH ROLLBACK IMMEDIATE;
384
392
385
393
RESTORE DATABASE AdventureWorks2022 FROM URL ='https://<storage-account>.blob.core.windows.net/<container-name>/<firstbackupfile>.bak'
386
394
WITH NORECOVERY, REPLACE;
387
395
388
396
RESTORE LOG AdventureWorks2022 FROM URL ='https://<storage-account>.blob.core.windows.net/<container-name>/<secondbackupfile>.bak'
:::image type="content" source="media/tutorial-use-azure-blob-storage-service-with-sql-server/results-of-two-deleted-snapshot-files.png" alt-text="Screenshot of the SSMS results pane showing two file snapshots deleted." lightbox="media/tutorial-use-azure-blob-storage-service-with-sql-server/results-of-two-deleted-snapshot-files.png":::
@@ -476,10 +487,10 @@ To delete the resource group, run the following PowerShell code:
476
487
477
488
```powershell
478
489
# Define global variables for the script
479
-
$prefixName = '<prefix name>' # should be the same as the beginning of the tutorial
490
+
$prefixName = '<prefix name>' # should be the same as the beginning of the tutorial
480
491
481
492
# Set a variable for the name of the resource group you will create or use
482
-
$resourceGroupName=$prefixName + 'rg'
493
+
$resourceGroupName = $prefixName + 'rg'
483
494
484
495
# Adds an authenticated Azure account for use in the session
485
496
Connect-AzAccount
@@ -495,7 +506,7 @@ To delete the resource group, run the following PowerShell code:
495
506
496
507
-[SQL Server data files in Microsoft Azure](databases/sql-server-data-files-in-microsoft-azure.md)
497
508
-[File-Snapshot Backups for Database Files in Azure](backup-restore/file-snapshot-backups-for-database-files-in-azure.md)
498
-
-[SQL Server backup to URL for Microsoft Azure Blob Storage](backup-restore/sql-server-backup-to-url.md)
509
+
-[SQL Server backup to URL for Azure Blob Storage](backup-restore/sql-server-backup-to-url.md)
499
510
-[Shared Access Signatures, Part 1: Understanding the SAS Model](/azure/storage/common/storage-sas-overview)
0 commit comments