Slipstream Installation of Service Packs and Cumulative Updates on SQL Server 2016 and Higher

By:   |   Comments (1)   |   Related: More > Database Administration


Problem

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?

Solution

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.

SQLServer2008SP1-KB968369-x64-ENU.exe /x:C:\SQL2K8SP1-x64

They also used the /PCUSource parameter to specify the location of the extracted update files, as shown below.

setup.exe /PCUSource=C:\SQL2K8SP1-x64

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"
cmd line run setup.exe

The Product Updates section of the SQL Server Setup process will confirm whether the updates have been detected.

sql server setup

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.

sql server setup

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.

Next Steps

Read the following from Microsoft on updating SQL Server:



sql server categories

sql server webinars

subscribe to mssqltips

sql server tutorials

sql server white papers

next tip



About the author
MSSQLTips author Edwin Sarmiento Edwin M Sarmiento is a Microsoft SQL Server MVP and Microsoft Certified Master from Ottawa, Canada specializing in high availability, disaster recovery and system infrastructures.

This author pledges the content of this article is based on professional experience and not AI generated.

View all my tips



Comments For This Article




Tuesday, February 22, 2022 - 10:09:32 AM - Pablo Back To Top (89817)
Hi Sir, thank you for your article.
To be clear, there is no oficial SQL server 2017 or higher that conatins the latest CU all in one package?














get free sql tips
agree to terms