無法在 Windows Server 2022 上安裝 Sql Server 2019
在全新安裝的 Windows Server 2022 標準中,我正在嘗試安裝 SQL Server 2019。
我下載了 eval 版本,輸入密鑰並繼續安裝數據庫引擎。預設實例。嘗試了混合和 Windows 身份驗證。
- 預設
- NT 權限\系統
- NT 當局\本地服務
- NT AUTHORITY\網路服務
在安裝結束時,我仍然收到相同的錯誤:“等待數據庫引擎恢復句柄失敗”。
TITLE: Microsoft SQL Server 2019 Setup ------------------------------ The following error has occurred: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes. For help, click: https://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=15.0.4013.40&EvtType=0xD15B4EB2%25400x4BDAF9BA%25401306%254026 ------------------------------ BUTTONS: OK ------------------------------
每次我嘗試解除安裝 SQL Server,重新安裝並嘗試另一種帳戶類型。我還嘗試將 SQL Server 程序本身的帳戶設置為不同的帳戶類型,但沒有任何效果。我也嘗試了此處列出的所有內容,但沒有任何東西可以讓安裝程序成功。
是否有其他人能夠在 Windows Server 2022 上安裝 SQL Server 2019?應該支持它,但它不會安裝這太瘋狂了。
這台機器上幾乎沒有安裝任何其他東西。
一些日誌:
Overall summary: Final result: Failed: see details below Exit code (Decimal): -2061893606 Start time: 2021-10-14 12:00:52 End time: 2021-10-14 12:13:30 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: WEB02 Machine processor count: 32 OS version: Microsoft Windows Server 2022 Standard (10.0.20348) 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:\SQL2019\Evaluation_ENU\x64\setup\ Installation edition: Standard Product Update Status: None discovered. Notice: A paid SQL Server edition product key has been provided for the current action - Standard. Please ensure you are entitled to this SQL Server edition with proper licensing in place for the product key (edition) supplied. User Input Settings: ACTION: Install ADDCURRENTUSERASSQLADMIN: false AGTSVCACCOUNT: NT Service\SQLSERVERAGENT 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 Files\Microsoft SQL Server\150\Setup Bootstrap\Log\20211014_120026\ConfigurationFile.ini CTLRSTARTUPTYPE: 0 CTLRSVCACCOUNT: <empty> CTLRSVCPASSWORD: <empty> CTLRUSERS: <empty> ENABLERANU: false ENU: true EXTSVCACCOUNT: <empty> EXTSVCPASSWORD: <empty> FEATURES: SQLENGINE FILESTREAMLEVEL: 0 FILESTREAMSHARENAME: <empty> FTSVCACCOUNT: <empty> FTSVCPASSWORD: <empty> HELP: false IACCEPTPYTHONLICENSETERMS: false IACCEPTROPENLICENSETERMS: false IACKNOWLEDGEENTCALLIMITS: false INDICATEPROGRESS: false INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\ INSTALLSHAREDWOWDIR: C:\Program Files (x86)\Microsoft SQL Server\ INSTALLSQLDATADIR: F:\Microsoft SQL Server\ INSTANCEDIR: C:\Program Files\Microsoft SQL Server\ INSTANCEID: MSSQLSERVER INSTANCENAME: MSSQLSERVER ISMASTERSVCACCOUNT: NT AUTHORITY\Network Service ISMASTERSVCPASSWORD: <empty> ISMASTERSVCPORT: 8391 ISMASTERSVCSSLCERTCN: <empty> ISMASTERSVCSTARTUPTYPE: Automatic ISMASTERSVCTHUMBPRINT: <empty> ISSVCACCOUNT: NT AUTHORITY\Network Service ISSVCPASSWORD: <empty> ISSVCSTARTUPTYPE: Automatic ISTELSVCACCT: <empty> ISTELSVCPASSWORD: <empty> ISTELSVCSTARTUPTYPE: 0 ISWORKERSVCACCOUNT: NT AUTHORITY\Network 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: <empty> SECURITYMODE: <empty> SQLBACKUPDIR: <empty> SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS SQLJAVADIR: <empty> SQLMAXDOP: 8 SQLMAXMEMORY: 2147483647 SQLMINMEMORY: 0 SQLSVCACCOUNT: NT Service\MSSQLSERVER SQLSVCINSTANTFILEINIT: true SQLSVCPASSWORD: <empty> SQLSVCSTARTUPTYPE: Automatic SQLSYSADMINACCOUNTS: WEB02\Administrator SQLTELSVCACCT: NT Service\SQLTELEMETRY 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: 1 UIMODE: Normal UpdateEnabled: true UpdateSource: MU USEMICROSOFTUPDATE: false USESQLRECOMMENDEDMEMORYLIMITS: false X86: false Configuration file: C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log\20211014_120026\ConfigurationFile.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: Global rules: Warning IsFirewallEnabled The Windows Firewall is enabled. Make sure the appropriate ports are open to enable remote access. See the rules documentation at https://go.microsoft.com/fwlink/?linkid=2094702 for information about ports to open for each feature. Rules report file: C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log\20211014_120026\SystemConfigurationCheck_Report.htm
2021-10-14 12:08:14.01 Server Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) Sep 24 2019 13:48:23 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2022 Standard 10.0 <X64> (Build 20348: ) 2021-10-14 12:08:14.01 Server UTC adjustment: 2:00 2021-10-14 12:08:14.01 Server (c) Microsoft Corporation. 2021-10-14 12:08:14.01 Server All rights reserved. 2021-10-14 12:08:14.01 Server Server process ID is 2872. 2021-10-14 12:08:14.01 Server System Manufacturer: 'ASUS', System Model: 'System Product Name'. 2021-10-14 12:08:14.01 Server Authentication mode is WINDOWS-ONLY. 2021-10-14 12:08:14.01 Server Logging SQL Server messages in file 'F:\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG'. 2021-10-14 12:08:14.01 Server The service account is 'NT Service\MSSQLSERVER'. This is an informational message; no user action is required. 2021-10-14 12:08:14.01 Server Registry startup parameters: -d F:\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\master.mdf -e F:\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG -l F:\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\mastlog.ldf 2021-10-14 12:08:14.01 Server Command Line Startup Parameters: -s "MSSQLSERVER" -m "SqlSetup" -Q -q "SQL_Latin1_General_CP1_CI_AS" -T 4022 -T 4010 -T 3659 -T 3610 -T 8015 2021-10-14 12:08:14.01 Server SQL Server detected 1 sockets with 16 cores per socket and 32 logical processors per socket, 32 total logical processors; using 32 logical processors based on SQL Server licensing. This is an informational message; no user action is required. 2021-10-14 12:08:14.01 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required. 2021-10-14 12:08:14.01 Server Detected 130982 MB of RAM. This is an informational message; no user action is required. 2021-10-14 12:08:14.01 Server Using conventional memory in the memory manager. 2021-10-14 12:08:14.01 Server Page exclusion bitmap is enabled. 2021-10-14 12:08:14.16 Server Buffer Pool: Allocating 33554432 bytes for 20957208 hashPages. 2021-10-14 12:08:14.40 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033) 2021-10-14 12:08:14.40 Server Automatic soft-NUMA was enabled because SQL Server has detected hardware NUMA nodes with greater than 8 physical cores. 2021-10-14 12:08:14.42 Server Buffer pool extension is already disabled. No action is necessary. 2021-10-14 12:08:14.43 Server Perfmon counters for resource governor pools and groups failed to initialize and are disabled. 2021-10-14 12:08:14.44 Server Query Store settings initialized with enabled = 1, 2021-10-14 12:08:14.44 Server The maximum number of dedicated administrator connections for this instance is '1' 2021-10-14 12:08:14.44 Server This instance of SQL Server last reported using a process ID of 8512 at 10/14/2021 12:08:11 PM (local) 10/14/2021 10:08:11 AM (UTC). This is an informational message only; no user action is required. 2021-10-14 12:08:14.45 Server Node configuration: node 0: CPU mask: 0x0000000055555555:0 Active CPU mask: 0x0000000055555555:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required. 2021-10-14 12:08:14.45 Server Node configuration: node 1: CPU mask: 0x00000000aaaaaaaa:0 Active CPU mask: 0x00000000aaaaaaaa:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required. 2021-10-14 12:08:14.49 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required. 2021-10-14 12:08:14.49 Server Lock partitioning is enabled. This is an informational message only. No user action is required. 2021-10-14 12:08:14.50 Server In-Memory OLTP initialized on standard machine. 2021-10-14 12:08:14.50 Server [INFO] Created Extended Events session 'hkenginexesession' 2021-10-14 12:08:14.50 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required. 2021-10-14 12:08:14.50 Server Total Log Writer threads: 4. This is an informational message; no user action is required. 2021-10-14 12:08:14.53 Server Database Mirroring Transport is disabled in the endpoint configuration. 2021-10-14 12:08:14.53 Server clwb is selected for pmem flush operation. 2021-10-14 12:08:14.53 spid12s Warning ****************** 2021-10-14 12:08:14.53 spid12s SQL Server started in single-user mode. This an informational message only. No user action is required. 2021-10-14 12:08:14.54 spid12s Starting up database 'master'. 2021-10-14 12:08:14.55 spid12s There have been 256 misaligned log IOs which required falling back to synchronous IO. The current IO is on file F:\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\master.mdf. 2021-10-14 12:08:14.56 Server CLR version v4.0.30319 loaded. 2021-10-14 12:08:14.65 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
Detail.txt ( https://pastebin.com/3YGx1Dtn ) 來自:C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log\20211023_000906
這是在 Windows 11 或 Windows Server 2022 上安裝 SQL Server 後的新問題。
SQL Server 需要正確的邏輯和物理儲存驅動器扇區大小值,這似乎是 Windows 11 和 Windows Server 2022 上新一代驅動器(如 M ssd)上的主要問題。
解決方案:在另一個驅動器上安裝 sql server,例如外部驅動器
更新:更好的解決方案
只需為 sql 數據庫使用虛擬驅動器 (VHD),而不是 sql 本身
這是一個已知問題,在此處記錄:
該文件僅提及 Windows 11,但該問題也出現在 Windows Server 2022 上,並且適用相同的解決方法。
簡而言之:
- 現代 SSD 的“扇區大小”大於 4096 字節。
- 某些軟體產品(例如 SQL Server)不支持如此大的扇區大小。因此,2022 年之前的 Windows 10 和 Windows Server 在這些現代驅動器上“模擬”了 4096 的扇區大小。
- 預設情況下,此仿真在 Windows 11/Server 2022 中處於關閉狀態。
以下命令行可以告訴您是否受到此問題的影響(替換
C:
為包含 SQL Server DB 文件的驅動器):fsutil fsinfo sectorinfo C:
在受影響的系統上, 的值
PhysicalBytesPerSectorForAtomicity
大於4096
。解決此問題的最簡單方法是重新打開仿真層,這可以通過使用以下命令行設置系統資料庫項來完成:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "ForcedPhysicalSectorSizeInBytes" /t REG_MULTI_SZ /d "* 4095" /f
重啟後(沒有測試是否真的有必要),SQL Server 2019成功安裝在我的Windows Server 2022系統上。