在我的笔记本电脑上,Windows 10 Professional 上运行 SQL Server Express 2017。一切都很好,直到 Windows 或我尝试安装更新KB4505224。它失败并终止了服务器实例,这意味着我无法再使用 SSMS 连接到它,也无法启动该服务。
读过这,我卸载然后重新安装,这次将 SQL Server 数据库引擎的帐户名从 更改为NT Service\MSSQL$SQLEXPRESS
,NT AUTHORITY\LOCAL SERVICE
因为我只在我的笔记本电脑上本地使用它,它不需要为任何其他机器提供任何服务。
然后我再次运行更新。它再次失败。它说:
Action required:
Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Feature failure reason:
An error occurred during the setup process of the feature.
Error details:
§ Error installing SQL Server Database Engine Services Instance Features
Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error code: 0x851A001A
Visit [some link] to get help on troubleshooting.
(该链接没有帮助,或者也许我被那里的所有商业信息误导了。)
日志中的最后几行,在第一个错误出现之前开始:
2019-07-29 20:50:56.02 spid6s Uploading data collector package from disk: c:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\Install\SqlTraceCollect.dtsx
2019-07-29 20:50:56.02 spid6s Error: 2775, Severity: 17, State: 12.
2019-07-29 20:50:56.02 spid6s The code page 65001 is not supported by the server.
2019-07-29 20:50:56.02 spid6s Error: 912, Severity: 21, State: 2.
2019-07-29 20:50:56.02 spid6s Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 200, state 7, severity 25. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.
2019-07-29 20:50:56.02 spid6s Error: 3417, Severity: 21, State: 3.
2019-07-29 20:50:56.02 spid6s Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.
2019-07-29 20:50:56.02 spid6s SQL Server shutdown has been initiated
2019-07-29 20:50:56.02 spid6s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
我根本不是专家,但我认为它首先失败是因为不支持代码页 65001,因此它无法更新主数据库,它被脱机并因此关闭了服务器实例。请执行 CMIIW。
如何安装 SQL Server Express 以使其具有不会使补丁程序崩溃的代码页并支持 UTF-8?(65001是UTF-8,不是吗?我确实需要这个。数据都是 UTF-8。
我可以让 Windows 仅推迟此补丁,但正常更新其他所有内容吗?我认为我不需要该补丁,它只是我正在运行的一些 OEM 软件的本地引擎,它几乎总是位于防火墙后面,其他机器看不到它。
答案1
谷歌搜索“服务器不支持 sql server express 2017 代码页 65001”导致这个答案在 StackExchange 上,区域设置/管理/系统区域设置下的“Beta:UTF-8 支持”复选框应该关闭。因此,为了清楚起见:
- 安装补丁失败,服务器实例无法启动,无法访问主数据库。
- 关闭勾选框
- 重新安装补丁。
没有帮助。然后:
- 卸载 SQL Server
- 重新安装 SQL Server,复选框仍然关闭。
- 让 Windows 安装补丁。
这有效。