SQL Server:安装失败,错误代码为 0x851A001A – 等待数据库引擎恢复句柄失败

Alf*_*Roa 5 sql-server-2017

细节:

  • SQL Server 2017(开发人员版或 Express 版)
  • Windows 2011 操作系统

我已经关注了这篇文章,但没有效果https://blog.sqlauthority.com/2017/01/27/sql-server-sql-installation-fails-error-code-0x851a001a-wait-database-engine-recovery-handle -失败的/

  Feature:                       Database Engine Services
  Status:                        Failed
  Reason for failure:            An error occurred during the setup process of the feature.
  Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
  Component name:                SQL Server Database Engine Services Instance Features
  Component error code:          0x851A001A
  Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
  Error help link:               https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.1000.169&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

Ino*_*thi 8

原因是什么?

这是由磁盘的扇区大小引起的。

在服务启动期间,SQL Server 开始数据库恢复过程以确保数据库一致性。此数据库恢复过程的一部分涉及在尝试打开系统和用户数据库文件的活动之前对底层文件系统进行一致性检查。

在运行 Windows 11 的系统上,一些新的存储设备和设备驱动程序将公开大于支持的 4 KB 扇区大小的磁盘扇区大小。

发生这种情况时,SQL Server 将因文件系统不受支持而无法启动,因为 SQL Server 目前支持的扇区存储大小为 512 字节和 4 KB。

您可以通过运行以下命令来确认是否遇到此特定问题:

fsutil fsinfo 扇区信息 E:

查找以字节为单位返回的值PhysicalBytesPerSectorForAtomicity。值 4096 表示扇区存储大小为 4 KB。

如何解决它!

只需按照本页上的说明进行操作即可。

https://learn.microsoft.com/en-us/troubleshoot/sql/admin/troubleshoot-os-4kb-disk-sector-size#resolutions

如果您不想更改操作系统,您应该在上述网站上尝试此解决方案。

您可以添加一个注册表项,这将使 Windows 11 及更高版本的行为与 Windows 10 类似。这将强制将扇区大小模拟为 4 KB。要添加 ForcedPhysicalSectorSizeInBytes 注册表项,请使用注册表编辑器,或者您可以在 Windows 命令提示符或 PowerShell 中运行以下命令之一(以管理员身份执行)。

更改注册表后,必须重新启动设备,然后重新安装程序。不然这个方法就不行了!