sql-server - 修补 SQL Server LocalDB
问题描述
我安装了 SQL Server 2017 LocalDb (v14.0.1000.169)。我想以无人值守的方式使用最新的 CU 修补此安装。
但是,当我从 SQLServer2017-KB4508218-x64 运行 setup.exe 时,它说我没有安装合适的版本。
C:\test\extracted>setup.exe /action=patch /allinstances /quiet /IAcceptSQLServerLicenseTerms
Microsoft (R) SQL Server 2017 14.00.3223.03
Copyright (c) 2017 Microsoft. All rights reserved.
No features were updated during the setup execution. The requested features may not be installed or features are already at a higher patch level. Please review the summary.txt logs for further details.
The version of SQL Server instance Shared Component does not match the version expected by the SQL Server update. The installed SQL Server product version is 13.1.4414.46, and the expected SQL Server version is 14.0.1000.169.
但我肯定安装了该版本的 localdb:
C:\test\extracted>sqllocaldb versions
Microsoft SQL Server 2017 (14.0.1000.169)
我在这里做错了什么?还有另一种更新LocalDB的方法吗?由于此版本的 LocalDB 存在一个已知问题,我需要这样做。
以交互方式运行安装程序没有帮助 - 给出相同的消息。
解决方案
看来,如果您只使用 sqllocaldb.msi 安装 localdb,CU 安装程序将永远无法修补您的 localdb 实例。这似乎是一个长期存在的错误:
https://sqlblog.org/2012/09/06/sqllocaldb-vs-cumulative-updates
由于 Microsoft 没有提供超出 RTM 版本的更新 sqllocaldb.msi,因此您必须使用Express 版的完整安装程序,然后使用 CU 安装程序应用 CU。
这成功地检测到了 localdb(连同我被迫安装的 Express 实例)并修补了两者。
推荐阅读
- python - 在 python 和类型提示中更改字典值类型
- java - 您可以从 websocket 读取整个帧还是应该逐字节读取
- python - 扩展矩阵的通用算法
- proxy - 如何在已部署的智能合约上升级或添加新逻辑
- css - 自定义 webkit 滚动条的问题
- javascript - 如何有条件地激活提交按钮?
- c# - Xamarin 表单 ListView SelectedItem MVVM 绑定错误 XFC0009
- d3.js - 我们如何使用 d3.js 为 GeoPackage 文件绘制地图?
- amazon-ec2 - 如何在创建有权通过它承担角色的 EKS 集群中启用 kubectl?
- function - 来自不同文件函数的值返回空白 (Lua)