Skip to content

Commit 10aff3b

Browse files
committed
Staging sql failure error
1 parent f5bee4c commit 10aff3b

4 files changed

Lines changed: 65 additions & 1 deletion

File tree

43.4 KB
Loading
35.2 KB
Loading
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: SQL Server installation fails with error on Azure VM
3+
description: This article provides a resolution for the problem that occurs when you try to install a SQL Server instance on Windows Server 2022 on an Azure virtual machine (VM).
4+
ms.date: 03/15/2025
5+
ms.custom: sap:Azure SQL virtual machine
6+
ms.reviewer:
7+
ms.topic: troubleshooting
8+
---
9+
# Error (Cannot use file 'master.mdf' because it was originally formatted with sector size 4096) and SQL Server installation fails on a Windows Server 2022 Azure VM
10+
11+
This article helps you resolve a problem that occurs when you try to install SQL Server on Windows Server 2022 on a Microsoft Azure virtual machine (VM).
12+
13+
_Applies to:_   SQL Server on Azure VM - Windows, Windows Server 2022
14+
15+
## Symptoms
16+
17+
When you try to install a SQL Server instance on a Windows Server 2022 Microsoft Azure virtual machine (VM), the installation fails and you receive the following error message in the SQL Server error log when the engine tries to start during the installation:
18+
19+
> Cannot use file '...\master.mdf' because it was originally formatted with sector size 4096 and is now on a volume with sector size 8192. Move the file to a volume with a sector size that is the same as or smaller than the original sector size.
20+
21+
In this situation, you can see the following additional information in the Summary.txt log file in the SQL Server setup folder:
22+
23+
```
24+
Detailed results:
25+
Feature: Database Engine Services
26+
Status: Failed
27+
Reason for failure: An error occurred during the setup process of the feature.
28+
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
29+
Component name: SQL Server Database Engine Services Instance Features
30+
Component error code: 0x851A0019
31+
Error description: Could not find the Database Engine startup handle.
32+
```
33+
34+
35+
## Cause
36+
37+
NVMe is a communication protocol that facilitates faster and more efficient data transfer between servers and storage systems by using nonvolatile memory (NVMe). With NVMe, data can be transferred at the highest throughput and with the fastest response times.
38+
39+
Some of the newest Azure VM generations (such as Da/Ea/Fav6) have an NVMe-only storage interface and require an OS image that supports NVMe. However, these latest Azure VM generations deploy with a default sector size of 8 KB, which isn't currently supported by SQL Server. SQL Server currently supports disks with a standard native sector sizes of 512 bytes and 4 KB.
40+
41+
If an Azure virtual machine was deployed using the 8-KB sector size, and you attempt to install SQL Server after deployment, the installation can fail.
42+
43+
## Resolution
44+
45+
To resolve this problem, you must reinstall SQL Server after forcing the Azure VM to use the 4-KB sector size.
46+
47+
To successfully install SQL Server on your Azure VM, follow these steps:
48+
49+
1. If you've already installed SQL Server, then uninstall SQL Server. Otherwise, skip to the next step.
50+
1. Add the [ForcedPhysicalSectorSizeInBytes](../database-engine/database-file-operations/troubleshoot-os-4kb-disk-sector-size.md#resolutions) registry key.
51+
1. Verify the sector size is 4-KB by running the following command in an elevated command prompt: `fsutil fsinfo sectorinfo <volume pathname>`
52+
1. Restart the Azure VM.
53+
1. Reinstall SQL Server.
54+
55+
The following screenshot shows the output of the `fsutil fsinfo sectorinfo` command for the `E:` drive, which has a sector size of 8 KB:
56+
57+
:::image type="content" source="media/sql-installation-fails-error-azure-vm/8k-sector-size-example.png" alt-text="Screenshot of command prompt output of 8k sector size.":::
58+
59+
The following screenshot shows the output of the `fsutil fsinfo sectorinfo` command for the `E:` drive after updating the registry key to use the 4-KB sector size:
60+
61+
:::image type="content" source="media/sql-installation-fails-error-azure-vm/4k-sector-size-example.png" alt-text="Screenshot of command prompt output of 4-KB sector size.":::
62+
63+
The `ForcedPhysicalSectorSizeInBytes` registry key is an OS-level setting, meaning that all drives currently attached, and those attached in the future, use the 4-KB sector size unless this registry key is removed.

support/sql/toc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ items:
99

1010
- name: Azure SQL Virtual Machine
1111
items:
12+
- name: SQL Server installation fails on some Azure VMs
1213
- name: FCI installation fails with error on Azure VM
13-
href: azure-sql/fci-installation-fails-error-azure-vm.md
14+
href: azure-sql/sql-installation-fails-error-azure-vm.md
1415

1516
- name: Data Quality Services (DQS)
1617
items:

0 commit comments

Comments
 (0)