KB5058713 can not install
Hello, I have the same problem, KB5058713 can't install, it says installation error 0x851a0042, please, how can I solve it, thanks.
SQL Server | Other
-
Erland Sommarskog • 128.6K Reputation points • MVP • Volunteer Moderator2025-07-16T21:31:43.2133333+00:00 Did you try installing the patch directly from https://www.microsoft.com/download/details.aspx?id=108274, rather than Windows Update?
If not do that. If nothing else, it can give us better diagnostics.
In the folder C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log, there is one folder per installation attempt, including installation of CUs and security updates.
-
XM G • 0 Reputation points
2025-07-18T15:03:11.16+00:00 Overall summary:
Final result: 修补程序的安装程序无法更新以下实例: TEW_SQLEXPRESS。若要确定失败的原因,请查看日志文件。
Exit code (Decimal): -2061893566
Start time: 2025-07-18 22:59:06
End time: 2025-07-18 23:00:01
Requested action: Patch
Instance TEW_SQLEXPRESS overall summary:
Final result: 修补程序的安装程序无法更新共享功能。若要确定失败的原因,请查看日志文件。
Exit code (Decimal): -2061893566
Start time: 2025-07-18 22:59:39
End time: 2025-07-18 22:59:54
Requested action: Patch
Machine Properties:
Machine name: LAPTOP
Machine processor count: 16
OS version: Microsoft Windows 11 家庭中文版 (10.0.26100)
OS service pack:
OS region: 中国
OS language: 中文(中国)
OS architecture: x64
Process architecture: 64 位
OS clustered: 否
Product features discovered:
Product Instance Instance ID Feature Language Edition Version Clustered Configured
SQL Server 2019 TEW_SQLEXPRESS MSSQL15.TEW_SQLEXPRESS 数据库引擎服务 1033 Express Edition 15.0.2130.3 否 是
Package properties:
Description: Microsoft SQL Server 2019
ProductName: SQL Server 2019
Type: RTM
Version: 15
SPLevel: 0
KBArticle: KB5058713
KBArticleHyperlink: https://support.microsoft.com/?kbid=5058713
PatchType: GDR
AssociatedHotfixBuild: 4435
Platform: x64
PatchLevel: 15.0.2135.5
ProductVersion: 15.0.2000.5
GDRReservedRange: 15.0.2005.0:15.0.2010.0
Installation location: F:\f8eb7add75bb71ca2a\x64\setup\
Updated product edition:
Instance Edition
TEW_SQLEXPRESS Express
用户输入设置:
ACTION: Patch
ALLINSTANCES: false
CLUSTERPASSIVE: false
CONFIGURATIONFILE:
ENU: false
HELP: false
IACCEPTPYTHONLICENSETERMS: false
IACCEPTROPENLICENSETERMS: false
IACCEPTSQLSERVERLICENSETERMS: true
IACKNOWLEDGEENTCALLIMITS: false
INDICATEPROGRESS: false
INSTANCEID: <空>
INSTANCENAME: <空>
MRCACHEDIRECTORY:
QUIET: false
QUIETSIMPLE: false
SUPPRESSPAIDEDITIONNOTICE: false
SUPPRESSPRIVACYSTATEMENTNOTICE: false
UIMODE: Normal
X86: false
Rules with failures or warnings:
Rules report file: C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log\20250718_225905\SystemConfigurationCheck_Report.htm
-
XM G • 0 Reputation points
2025-07-18T15:04:50.9966667+00:00 I tried to download and install, but it still 0x851A0042 with an error code
-
Erland Sommarskog • 128.6K Reputation points • MVP • Volunteer Moderator2025-07-18T20:16:25.0366667+00:00 As I said, in the folder C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log there are a number of log files. The ones of most interest are summary.txt and detail.txt. Feel free to attach them here. (But do not include them in a post. They are far too long for that.)
-
XM G • 0 Reputation points
2025-07-19T13:14:38.73+00:00 -
XM G • 0 Reputation points
2025-07-19T13:14:57.6266667+00:00 -
XM G • 0 Reputation points
2025-07-19T13:19:32.9133333+00:00 -
Erland Sommarskog • 128.6K Reputation points • MVP • Volunteer Moderator2025-07-19T21:24:23.4766667+00:00 Sorry, I think I asked for the wrong files. This might be the first I time I'm looking at log files for an patch rather than a new install.
In the folder you found these files, there should be a subfolder for the instance TEW_SQLEXPRESS. In this folder there is also
detail.txt. This one should have error message where setup fails. (I can say this with some confidence, because this KB failed on my machine as well, due to a known issue on my machine.)In the top folder there might be a file with a name like SQLServer_ERRORLOG_2025-07-11T13.56.49. If you find such a file, attach that one as well.
-
XM G • 0 Reputation points
2025-07-22T14:51:55.9933333+00:00 Detail.txt this is the file。
-
Erland Sommarskog • 128.6K Reputation points • MVP • Volunteer Moderator2025-07-22T15:54:10.32+00:00 I found this:
(01) 2025-07-19 21:11:17 SQLEngine: --SqlEngineSetupPrivate: Validating path:D:\Program Files (x86)\Solidworks2022\MSSQL15.TEW_SQLEXPRESS\MSSQL (01) 2025-07-19 21:11:17 Slp: 在 Validation 的时间内和应用场景 Validation 中为功能 SQL_Engine_Core_Inst 执行的配置操作失败。 (01) 2025-07-19 21:11:17 Slp: 注册表中的数据库引擎系统数据目录无效。
I don't know Chinese, but consulting Google Translate, I see that 注册表中的数据库引擎系统数据目录无效。translates to The database engine system data directory in the registry is invalid.
And indeed, the path above does not seem valid. To wit, that is the path for an 32-bit program, but SQL Server 2019 is only available in 64-bit.
It seems that someone (you?) have messed with the registry, for instance the ProgramFilesDir setting.
I hope this information is helpful for your further troubleshooting.
-
XM G • 0 Reputation points
2025-07-22T16:21:22.96+00:00 Thanks for the reply, I didn't mess with the registry, please, how should I fix this issue?
-
Erland Sommarskog • 128.6K Reputation points • MVP • Volunteer Moderator2025-07-22T16:45:49.8166667+00:00 You could try the Repair option in SQL Server Configuration Center or through Program and Features in the Control Panel.
If that does not work out, I think you do best in let it be, and accept that you cannot apply security fixes for SQL 2019.
I don't want to give suggestions for how to clean up the registry, because I don't know how your registry looks like, so if I give incorrect advice that could mess up your machine further.
-
XM G • 0 Reputation points
2025-07-22T16:48:05.4133333+00:00 Okay, thanks for your help, I'll try it first, thank you very much.
-
Kissenger • 0 Reputation points
2025-07-23T02:48:43.7966667+00:00 Same question @Kai1 Nguyen
-
Erland Sommarskog • 128.6K Reputation points • MVP • Volunteer Moderator2025-07-23T09:10:41.3266667+00:00 Same question @Kai1 Nguyen
If so, post a new Question. The underlying reason why you cannot apply the GDR may be different from what XM G ran into - actually that is quite likely. But please, before posting, review this thread so that you attach the correct log files. Make sure to apply tag
SQL Server Database Engine -
K Durga Prasanna • 20 Reputation points • Microsoft External Staff
2025-11-25T07:06:25.44+00:00 Hi @XM G
We would like to confirm whether the issue has been resolved. If it is still outstanding, please share any additional information so we can assist you further.
Thank you.
-
K Durga Prasanna • 20 Reputation points • Microsoft External Staff
2025-12-02T10:37:50.42+00:00 Hi @XM G
Hope everything’s going great with you. Just checking in has the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.
Thank you.
Sign in to comment