Every once in a while you need to install SQL Server. It could be the SQL Server Express edition because you are using the Database for MDT 2013 Lite Touch, or the full SQL Server to support a System Center 2012 R2 product. Either way, both versions supports installing updates as part of the setup, and here follows the step to install SQL Server 2012 SP1 with CU8. Of course fully automated.
In the scenario the SQL Server setup is intended for ConfigMgr 2012 R2 but you use the same technique for all types of SQL Installs. The overview steps are:
- Prepare the SQL Setup files
- Prepare the unattended file for the SQL Setup engine
- Run the installation
Step 1 – Prepare the SQL Setup files
Preparing the SQL setup files can be done in two ways:
- Option 1 – You can use the new UpdateSource option to have the SQL setup install the CU8 update as is.
- Option 2 – You can extract the CU8 bits to a folder, and use the CUSOURCE option (legacy, but still supported)
In this guide, I have my SQL Server 2012 with SP1 setup files in the D:\Setup\SQL Server 2012 SP1 folder.
Option 1 – Use the UpdateSource option
Having the SQL setup engine install the CU8 update as is during setup is quite elegant. This feature is named "Product Update".
- Download CU8 for SQL Server 2012 SP1 (http://support.microsoft.com/kb/2917531), and extract the file you downloaded (*_zip.exe), into the D:\Setup\SQL Server 2012 SP1 CU8 folder.
The extracted SQLServer2012-KB2917531-x64.exe file.
- To verify that the setup process can find the CU8 update, run SQL Setup (setup.exe) with the /Action=Install /UpdateSource="D:\Setup\SQL Server 2012 SP1 CU8" switch. Once the wizard starts, continue until you see the Product Updates page, and then click Cancel.
- Now, when you verified it works, go to Step 2 – Prepare the unattended file for the SQL Setup engine.
Option 2 – Use the CUSOURCE option
This is the legacy (meaning old) way of installing updates, and is referenced to as slipstreaming in the SQL documentation. This feature is using setup parameters PCUSource and CUSource, which still works but may be removed in a future release of SQL Server Setup. The /UpdateSource parameter described in option 1, combines the functionality of the slipstream parameters.
- Download CU8 for SQL Server 2012 SP1 (http://support.microsoft.com/kb/2917531), and extract it.
- For the slipstream method, you need to extract the CU8 update twice, first you extract the file you download (*_zip.exe), and then you extract that file (SQLServer2012-KB2917531-x64.exe) into the D:\Setup\SQL Server 2012 SP1 CU8 folder. You can use the /X switch to extract the content.
Step 2 – Prepare the unattended file for the SQL Setup engine
When installing SQL Server, you should always use an unattend file for the following reasons:
- It's automated
- Yes, because its AUTOMATED!
- You have all setup options easily summarized
- You automatically have your setup documented
- It's faster than a manual setup
In this download you find two complete .ini-file (SQLConfigurationFile.ini) for the SQL Server 2012 SP1 setup I use for ConfigMgr 2012 R2. The file in the "Option 1" folder is using the new /UpdateSource property, and the file in the "Option 2" folder is using the legacy CUSOURCE slipstreaming option.
Note #1: Even though you now can specify some database locations in the ConfigMgr 2012 R2 setup, I still recommend configure those locations when setting up SQL Server 2012 SP1.
; Default directory for the Database Engine backup files. SQLBACKUPDIR="F:\SQLBCK" ; Default directory for the Database Engine user databases. SQLUSERDBDIR="F:\SQLDB" ; Default directory for the Database Engine user database logs. SQLUSERDBLOGDIR="G:\SQLLOG" ; Directory for Database Engine TempDB files. SQLTEMPDBDIR="E:\SQLTMP"
Note #2: If you use these samples, you probably want to change the account(s) to provision as SQL Server system administrators
Step 3 – Run the installation
Copy the correct SQLConfigurationFile.ini file to the D:Setup folder, and run the setup.exe with the /CONFIGURATIONFILE=D:\Setup\SQLConfigurationFile.ini switch.
Or, have a script (wrapper) run it.
Or, have the task sequence run it.
Or, have the task sequence run a script that runs it.
You get the point. Automation is King, and as long it is automated you are not very likely to hear me complain (much) 🙂