Slipstream Installation of Service Packs and Cumulative Updates on SQL Server 2016 and Higher
By: Edwin Sarmiento | Updated: 2020-06-24 | Comments | Related: More > Database Administration
In a previous tip on Slipstream Service Packs and Cumulative Updates on a SQL Server 2008 Installation, I have seen how to install SQL Server 2008 and include service packs and cumulative updates to reduce deployment time and effort. I tried the steps outlined on a SQL Server 2016 installation and it didn't work. How do I go about slipstreaming service packs or cumulative updates when installing SQL Server 2016 and higher?
Previous versions of SQL Server require extracting the service pack or cumulative update first before including it in the installation process. The previous tip highlights this using the /x parameter as shown below, extracting the SQL Server 2008 Service Pack 1 files to a folder named C:\SQL2K8SP1-x64.
They also used the /PCUSource parameter to specify the location of the extracted update files, as shown below.
Starting with SQL Server 2012, Microsoft changed the way service packs and cumulative updates are slipstreamed during installation. You can download the service pack (from SQL Server 2012 to SQL Server 2016) or cumulative update (from SQL Server 2017 onwards as per this tip) file and include it in your installation media. Extracting the packages is no longer necessary. In fact, if you extract the package files, the installation media will not be able to use them. For this tip, SQL Server 2017 will be installed together with Cumulative Update 20. I highly recommend downloading every cumulative update for SQL Server 2017 and higher when they are released and only install the ones that you need. Microsoft only makes available the latest cumulative update for download. You will have to request for earlier service packs and cumulative updates.
Once you've downloaded the service pack or cumulative update file that you need, copy them to a either a local folder or shared folder. The server where you will install SQL Server into should have access to this folder. Using a shared folder allows you to keep a central repository of all the installation files instead of creating multiple copies of the same file. You can then install SQL Server using the command-line, specifying the following command-line parameters.
- /Action=Install: This tells the setup process to perform an installation. If you don't specify this parameter, the setup process will just launch the SQL Server Installation Center and ignore the other parameters pointing to the location of the service pack or cumulative update file.
- /UpdateEnabled=True: This tells the setup process to discover and include product updates. If there are discovered updates, they will be included as part of the installation.
- /UpdateSource=<location>: This tells the setup process to search the specified location for product updates. The example shows a shared folder as the location of the product update files.
Installing SQL Server from the command-line using the parameters described above allows you to install SQL Server and include any available updates. The example command below references the \\CentralFileServer\SQLServer2017CUs\CU20 shared folder to look for SQL Server 2017 updates.
setup.exe /Action=Install /UpdateEnabled=True /UpdateSource="\\CentralFileServer\SQLServer2017CUs\CU20"
The Product Updates section of the SQL Server Setup process will confirm whether the updates have been detected.
Proceed with the SQL Server installation process. The Ready to Install section of the SQL Server Setup process will also confirm the SQL Server version number after the installation. In this example, the installation media is using the RTM version of SQL Server 2017 (14.00.1000.169) while the update contains SQL Server 2017 CU 20 (14.0.3294.0) as shown in the Update Version: field.
Slipstreaming service packs and cumulative updates is a great way to reduce the amount of time and effort when installing SQL Server. And instead of simply running the SQL Server Installation Center, you can standardize the deployment and run the setup.exe command provided above with the corresponding parameters from a Windows batch file.
Read the following from Microsoft on updating SQL Server:
- Blog: SQL Server 2012 Setup just got smarter…
- Product Updates in SQL Server 2012 Installation
- Install SQL Server Servicing Updates
Last Updated: 2020-06-24
About the author
View all my tips