我无法在我的Windows 11计算机上安装SQL Server 2019,因为它无法启动数据库引擎服务,我不明白为什么。这是我的个人电脑,我有完全的访问权限。
我知道这个错误发布在互联网上,我已经在StackOverflow上看到了一些,但我在任何地方都找不到任何解决方案来帮助我解决这个问题。
安装失败屏幕截图
我花了好几个小时在网上尝试了多个教程,但我觉得我已经走到了死胡同。在绝望中,我甚至试着重新安装窗户,但都无济于事。
我希望我的解释足够清楚,尽管我几乎要睡着了,因为我熬夜试图解决这个问题。非常感谢您的帮助,我可以提供更多关于我尝试过或没有尝试过的日志或信息。
编辑:正如评论中所建议的,我已经用命令提示符检查了扇区大小,这是输出,实际上不是预期值:
C:WINDOWSsystem32>fsutil fsinfo sectorinfo C:
LogicalBytesPerSector : 512
PhysicalBytesPerSectorForAtomicity : 32768
PhysicalBytesPerSectorForPerformance : 32768
FileSystemEffectivePhysicalBytesPerSectorForAtomicity : 4096
Device Alignment : Aligned (0x000)
Partition alignment on device : Aligned (0x000)
No Seek Penalty
Trim Supported
Not DAX capable
Not Thinly-Provisioned
摘要日志:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2061893606
Start time: 2022-02-02 02:21:47
End time: 2022-02-02 02:25:37
Requested action: Install
Setup completed with required actions for features.
Troubleshooting information for those features:
Next step for SQLEngine: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Machine Properties:
Machine name: CISMAILPC
Machine processor count: 16
OS version: Microsoft Windows 11 Pro (10.0.22000)
OS service pack:
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature Language Edition Version Clustered Configured
Package properties:
Description: Microsoft SQL Server 2019
ProductName: SQL Server 2019
Type: RTM
Version: 15
SPLevel: 0
Installation location: C:SQL2019Developer_ENUx64setup
Installation edition: Developer
Product Update Status:
None discovered.
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: false
AGTSVCACCOUNT: NT AUTHORITYNETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Manual
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSERVERMODE: TABULAR
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: <empty>
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTELSVCACCT: <empty>
ASTELSVCPASSWORD: <empty>
ASTELSVCSTARTUPTYPE: 0
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CLTCTLRNAME: <empty>
CLTRESULTDIR: <empty>
CLTSTARTUPTYPE: 0
CLTSVCACCOUNT: <empty>
CLTSVCPASSWORD: <empty>
CLTWORKINGDIR: <empty>
COMMFABRICENCRYPTION: 0
COMMFABRICNETWORKLEVEL: 0
COMMFABRICPORT: 0
CONFIGURATIONFILE: C:Program FilesMicrosoft SQL Server150Setup BootstrapLog20220202_021140ConfigurationFile.ini
CTLRSTARTUPTYPE: 0
CTLRSVCACCOUNT: <empty>
CTLRSVCPASSWORD: <empty>
CTLRUSERS: <empty>
ENABLERANU: false
ENU: true
EXTSVCACCOUNT: <empty>
EXTSVCPASSWORD: <empty>
FEATURES: SQLENGINE, SNAC_SDK
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: <empty>
HELP: false
IACCEPTPYTHONLICENSETERMS: false
IACCEPTROPENLICENSETERMS: false
IACKNOWLEDGEENTCALLIMITS: false
INDICATEPROGRESS: false
INSTALLSHAREDDIR: C:Program FilesMicrosoft SQL Server
INSTALLSHAREDWOWDIR: C:Program Files (x86)Microsoft SQL Server
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:Program FilesMicrosoft SQL Server
INSTANCEID: MSSQLSERVER
INSTANCENAME: MSSQLSERVER
ISMASTERSVCACCOUNT: NT AUTHORITYNetwork Service
ISMASTERSVCPASSWORD: <empty>
ISMASTERSVCPORT: 8391
ISMASTERSVCSSLCERTCN: <empty>
ISMASTERSVCSTARTUPTYPE: Automatic
ISMASTERSVCTHUMBPRINT: <empty>
ISSVCACCOUNT: NT AUTHORITYNetwork Service
ISSVCPASSWORD: <empty>
ISSVCSTARTUPTYPE: Automatic
ISTELSVCACCT: <empty>
ISTELSVCPASSWORD: <empty>
ISTELSVCSTARTUPTYPE: 0
ISWORKERSVCACCOUNT: NT AUTHORITYNetwork Service
ISWORKERSVCCERT: <empty>
ISWORKERSVCMASTER: <empty>
ISWORKERSVCPASSWORD: <empty>
ISWORKERSVCSTARTUPTYPE: Automatic
MATRIXCMBRICKCOMMPORT: 0
MATRIXCMSERVERNAME: <empty>
MATRIXNAME: <empty>
MRCACHEDIRECTORY:
NPENABLED: 0
PBDMSSVCACCOUNT: <empty>
PBDMSSVCPASSWORD: <empty>
PBDMSSVCSTARTUPTYPE: 0
PBENGSVCACCOUNT: <empty>
PBENGSVCPASSWORD: <empty>
PBENGSVCSTARTUPTYPE: 0
PBPORTRANGE: <empty>
PBSCALEOUT: false
PID: *****
QUIET: false
QUIETSIMPLE: false
ROLE:
RSINSTALLMODE: DefaultNativeMode
RSSVCACCOUNT: <empty>
RSSVCPASSWORD: <empty>
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: SQL
SQLBACKUPDIR: <empty>
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLJAVADIR: <empty>
SQLMAXDOP: 8
SQLMAXMEMORY: 2147483647
SQLMINMEMORY: 0
SQLSVCACCOUNT: NT AUTHORITYSYSTEM
SQLSVCINSTANTFILEINIT: false
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: CISMAILPCismai
SQLTELSVCACCT: NT ServiceSQLTELEMETRY
SQLTELSVCPASSWORD: <empty>
SQLTELSVCSTARTUPTYPE: Automatic
SQLTEMPDBDIR: <empty>
SQLTEMPDBFILECOUNT: 8
SQLTEMPDBFILEGROWTH: 64
SQLTEMPDBFILESIZE: 8
SQLTEMPDBLOGDIR: <empty>
SQLTEMPDBLOGFILEGROWTH: 64
SQLTEMPDBLOGFILESIZE: 8
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SUPPRESSPAIDEDITIONNOTICE: false
SUPPRESSPRIVACYSTATEMENTNOTICE: false
TCPENABLED: 0
UIMODE: Normal
UpdateEnabled: true
UpdateSource: MU
USEMICROSOFTUPDATE: false
USESQLRECOMMENDEDMEMORYLIMITS: false
X86: false
Configuration file: C:Program FilesMicrosoft SQL Server150Setup BootstrapLog20220202_021140ConfigurationFile.ini
Detailed results:
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=15.0.4013.40&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026
Feature: SQL Browser
Status: Passed
Feature: SQL Writer
Status: Passed
Feature: SQL Client Connectivity SDK
Status: Passed
Feature: SQL Client Connectivity
Status: Passed
Rules with failures or warnings:
Rules report file: C:Program FilesMicrosoft SQL Server150Setup BootstrapLog20220202_021140SystemConfigurationCheck_Report.htm
问题在于Windows 11和NVMe驱动器的分区比SQL所能支持的大。你可以通过做";fsutil fsinfo sectorinfo C:"在管理员命令提示符中(C:这里是我们试图将SQL安装到的NVMe驱动器(,并查看PhysicalBytesPerctorForAtomicity";价值它应该是512或4096。
本文中的不同解决方案(请注意,一些解决方案需要修改注册表,请确保在修改注册表之前进行备份(:https://learn.microsoft.com/en-us/troubleshoot/sql/admin/troubleshoot-os-4kb-disk-sector-size#cause
这篇文章列出了一些解决方案。您也可以在另一个具有SQL支持的正确分区大小(512或4096(的驱动器上安装SQL。
此问题是因为Windows 11与SQL Server 2019不兼容。您必须启用Windows 10兼容性:
-
PhysicalBytesPerSectorForAtomicity
的值是您的问题。您应该运行以下命令:fsutil fsinfo sectorinfo <your drive name> E.g. fsutil fsinfo sectorinfo E:
-
如果它不是512或4096,您应该运行以下命令:
REG ADD "HKLMSYSTEMCurrentControlSetServicesstornvmeParametersDevice" /v "ForcedPhysicalSectorSizeInBytes" /t REG_MULTI_SZ /d "* 4095" /f
-
重新启动计算机并重新安装SQL server。
即使在PhysicalBytesPerctorForAtomicity=4096的情况下,在Windows 11上安装SQL2019时也存在上述问题。我克服它的唯一方法是在新创建的VHD驱动器上安装(最新的SQL Server2022 Express,但正如其他人所建议的,它也应该适用于2019年(。以下是创建一个的详细步骤(Windows 11也是如此(:https://www.windowscentral.com/how-create-and-set-vhdx-or-vhd-windows-10
玩了一些连接配置,并成功运行了它。祝你好运✌️
严格按照以下步骤操作https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?redirectedfrom=MSDN&view=sql-server-ver16
如果您已经尝试安装Microsoft SQL Server,请确保从所有位置正确删除它。
- 控制面板>卸载应用程序>所有";Microsoft SQL">
- 注册表编辑器>HKEY本地机器>软件>微软>MICROSOFT SQL(删除文件(
- C: \Program Files\Microsoft SQL Server-删除文件
- C: \Program Files(X86(\Microsoft SQL Server-删除文件
清除垃圾并重新启动电脑并运行安装程序,应该可以使用