A while ago, I published a post to slipstream the SQL Server 2008 media. It is time to update it for SQL Server 2019.
Fortunately the setup.exe hasn’t changed much, so it is still a matter of:
- Copying the RTM ISO on a read-write filesystem
- Unpack the Cumulative update of your choice
- Amend the defaultsetup.ini file to indicate where the Cumulative Update files are to be found
- Rebuild the ISO with a tool such as OSCDIMG.EXE. This tool can be found in the Windows Assessment and Deployment kit
Here’s the code which can be also found on GitHub.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
:: SQL Server 2019 Adding CU in a RTM Distribution and create ISOs @echo off if "%3"=="" goto :usage if errorlevel 9009 echo OSCDIMG.EXE was not found, ISO will not be created, please add /noiso setlocal set mediasource=%1 set mediacopy=%~dpn3 if exist %mediacopy% ( echo deleting %mediacopy% && rd %mediacopy% /s /q) echo Copying %mediasource% (R/O) to %mediacopy% robocopy %mediasource% %mediacopy% /E /COPY:DT set tempcu=%mediacopy%\cu for %%i in (%2\*.exe) do (echo Extracting %%i to %tempcu% && %%i /x:%tempcu% /q ) for %%i in (x64) do ( Echo creating/adding to defaultsetup.ini if necessary in %%i if not exist %mediacopy%\%%i\defaultsetup.ini [OPTIONS]>%mediacopy%\%%i\defaultsetup.ini attrib -r %mediacopy%\%%i\defaultsetup.ini echo CUSOURCE=".\CU">>%mediacopy%\%%i\defaultsetup.ini ) Echo creating ISO from %mediacopy% into %3 set label=%~n2 if /I "%4"=="/noiso" goto :noiso if /I "%5"=="/noiso" goto :noiso oscdimg -o -l%label% -u2 %mediacopy% %3 :noiso if /I "%4"=="/nocleanup" goto :nocleanup if /I "%5"=="/nocleanup" goto :nocleanup rd %mediacopy% /s /q goto :theend :nocleanup echo No cleanup made. Intermediate files in %mediacopy% :theend endlocal goto :eof :usage echo %~n0 SQLSource-Directory CU-Directory TargetDirectory [/nocleanup] [/noiso] :: echo SQLSource-Directory will be modified, so make a copy of the RTM distribution before applying this batch! echo e.g. echo %~nx0 E:\ C:\CU14 D:\Temp\SQLSERVER2019CU14.ISO echo. echo E:\ is a read-only source for the RTM version of SQL Server (e.g. mounted ISO) echo C:\CU14 is the location of the *untouched* KB exe of the CU echo CU14 will be then the label of the ISO, so you may want to name the directory like SQL2019CU14 instead. echo D:\temp\SQLSERVER2019CU14 side-by-side with the iso will be a temporary directory which will be erased afterwards echo /nocleanup will not remove D:\temp\SQLSERVER2019CU14 echo /noiso builds the structure and not the ISO echo. echo the build of the iso requires ISOCDIMG.EXE in the path |
Pingback: How can Cumulative Updates to SQL Server 2019 be Slipstreamed into a Single Installer?
Slipstreaming SQL Server images is mostly a waste of time as there is a more lightweight option available since SQL Server 2012.
You can download the latest Service Pack and Cumulative Update and copy them in a folder or share. From SQL 2017 on, there are no more Service Packs available. Just run the setup.exe with following parameters and provide the path to the update files:
setup.exe /action=install /updateenabled=true /updatesource=”\\fileserver\Install\SQL Updates\”
The setup will create an updated setup and install the latest version based on the updates found in the folder on the fly.
Additional parameter can also be provided for a specific ini-file or other settings.
There is no more maintenance for the iso required as you can update the setup just by dropping the updates in the provided folder.
Indeed, there are alternative ways to install cumulative updates nowadays.
However, the ISO method allows to make available to colleagues a “verified” all-in-one version with a single checksum, for example.
When using a share, you must compute several hashes and make sure the correct update package is linked to.