适用于:SQL Server - 仅限 Windows
滑行安装是将累积更新(SU)集成到 SQL Server 安装过程中的过程。 此方法可确保 SQL Server 随单个作中的最新修补程序和改进一起安装,而无需安装后修补程序。
流式处理适用于:
避免基介质中的已知设置问题
通过在一个作中执行安装和修补来减少部署时间和手动工作,并帮助避免额外的作系统重启。
流式处理的工作原理
在安装过程中,使用参数运行 SQL Server 安装 /UpdateEnabled=True 以启用更新集成,并使用 指定包含所需 CU /UpdateSource的文件夹。
例如:
setup.exe /Action=Install /UpdateEnabled=True /UpdateSource="C:\SQLUpdates"
此示例命令行作告知安装程序使用指定文件夹中的更新二进制文件,而不是原始基介质,在安装过程中应用它们。
有关使用滑行的指导
应将最新的累积更新集成到安装介质中,以确保实例以最稳定且最安全的配置开头。
在部署到生产环境之前,在过渡环境中测试滑行安装。
在环境中的所有服务器上使用一致的更新包来确保兼容性。
如果以后添加功能,请使用匹配的安装介质,或将相同的累积更新应用到现有实例。
何时使用滑行
设置 SQL Server 的新实例,并希望在安装期间对其进行修补,以避免不必要的重启。
遇到基本安装介质安装失败,需要修补的安装程序二进制文件。
跨多台计算机部署 SQL Server,并希望获得一致的可靠体验。
滑行安装步骤
步骤 1:创建用于存储 SQL 更新的文件夹
创建用于存储更新文件的本地文件夹。 例如:
New-Item -ItemType "Directory" -Path "C:\SQLUpdates" -Force
步骤 2:下载最新更新
将 SQL Server 版本 的最新累积更新 下载到新创建的文件夹。
步骤 3:使用滑行参数运行安装程序
使用以下命令运行 SQL Server 安装程序:
C:\SqlSetupMedia\setup.exe /Action=Install /UpdateEnabled=True /UpdateSource="C:\SQLUpdates"
| 参数 | Description |
|---|---|
/Action=Install |
告知 SQL Server 安装程序启动安装过程。 如果退出此参数,安装程序只会打开安装中心,并忽略其他参数(如更新路径)。 |
/UpdateEnabled=True |
启用更新检测。 它告知安装程序在安装过程中查找并包括任何可用更新(如累积更新)。 |
/UpdateSource=<location> |
指向存储更新文件(CU)的文件夹。 |
有关安装参数的详细信息,请参阅 命令提示符在 Windows 上安装和配置 SQL Server
步骤 4:完成设置
像往常一样继续执行安装向导。
在安装过程中,可以看到确认更新已集成。
步骤 5:验证安装是否成功
安装后,应用的 CU 将显示在:
程序和功能>已安装的更新 (从 Windows 开始菜单)
设置日志 (
Summary.txt) 下Patch Level。 有关详细信息,请参阅 “查看和读取 SQL Server 安装程序日志文件”。Overall summary: Final result: Passed Exit code (Decimal): 0 Start time: 2025-08-17 11:55:45 End time: 2025-08-17 12:14:24 Requested action: Install Machine Properties: Machine name: <machine-name> Machine processor count: 8 OS version: Microsoft Windows Server 2019 Standard (10.0.17763) 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 Package properties: Description: Microsoft SQL Server 2019 ProductName: SQL Server 2019 Type: RTM Version: 15 Installation location: C:\SQL Server\SQL 2019\SQLFull_ENU\x64\setup\ Installation edition: Enterprise Edition: Core-based Licensing Slipstream: True SP Level 0 Patch Level: 15.0.4430.1 Product Update Status: Success: KB 5054833 Product Updates Selected for Installation: Title: Hotfix Pack Knowledge Base Article: KB 5054833 Version: 15.0.4430.0 Architecture: x64 Language: All Update Source: C:\SQL Server\SQL 2019\SQLFull_ENU\CU
如何识别滑行安装
确认流式处理用于运行安装程序:
安装向导显示如下规则:
Update Setup Media Language Rule安装日志包括以下行:
Slipstream: True SP Level 0 Patch Level: 15.0.4430.1运行 SQL Server 功能发现报告 以验证版本级别。
注解
如果安装程序失败,请查看日志文件 C:\Program Files\Microsoft SQL Server\<nn>\Setup Bootstrap\Log\Summary.txt中的失败详细信息,该文件位于要 <nn> 安装的版本。 有关详细信息,请参阅 “查看和读取 SQL Server 安装程序日志文件”。
下面是失败的滑行安装示例。
Overall summary:
Final result: Failed: see results below
Exit code (Decimal): -2068643839
Start time: 2025-08-17 09:55:12
End time: 2025-08-17 10:03:01
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.
滑流式处理不会消除在安装后监视将来更新的需要。