适用于:Windows 上的 SQL Server
滑行安装是将累积更新(SU)集成到 SQL Server 安装过程中的过程。 此方法可确保 SQL Server 在一次操作中完成安装,并包含最新的修补程序和改进,而无需在安装后再打补丁。
流式安装适用于:
避免基础安装介质中已知的安装问题
通过在一个作中执行安装和修补来减少部署时间和手动工作,并帮助避免额外的作系统重启。
流式处理的工作原理
在安装过程中,运行 SQL Server 安装程序时,使用 /UpdateEnabled=True 参数启用更新集成,并使用 /UpdateSource 指定包含所需 CU 的文件夹。
例如:
setup.exe /Action=Install /UpdateEnabled=True /UpdateSource="C:\SQLUpdates"
此示例命令行作告知安装程序使用指定文件夹中的更新二进制文件,而不是原始基介质,在安装过程中应用它们。
使用 Slipstream 指南
应将最新的累积更新集成到安装介质中,以确保实例以最稳定且最安全的配置开头。
在部署到生产环境之前,先在暂存环境中测试流式安装。
在环境中的所有服务器上使用一致的更新包来确保兼容性。
如果以后添加功能,请使用匹配的安装介质,或将相同的累积更新应用到现有实例。
何时使用 Slipstream
设置 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 开始菜单)
在
Patch Level下设置日志(Summary.txt)。 有关详细信息,请参阅 “查看和读取 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.
流式安装并不能免除在安装后监控未来更新的必要性。