As promised from my last post, Relocating SQL Server System Databases without Access to the Instance, today I will be blogging about ‘unattended’ or ‘silent’ installations of SQL Server. I will be discussing the concept and uses of the unattended installation and then I will provide detailed explanation of my PowerShell script at a later date.
Microsoft provides us DBAs with a complete and relatively easy method of executing command line installs. The key to a command line installation is to either type out a VERY large command beginning with your installation media’s setup.exe file or the preferred and less messy method, generating a configuration.ini file. As seen on MSDN’s, How to: Install SQL Server 2008 R2 from the Command Prompt, the setup application will accept a parameter /CONFIGURATIONFILE=”c:\configuration.ini”. This file must contain all of the necessary switches, options, and parameters that are needed to answer every question which would have been mandatory in a GUI installation. By creating one of these files you can speed up your installation exponentially because you will be removing the time it takes to input information and work through the GUI and you will, as the name states, be able to run this installation unattended. I can’t count how many times installations had dragged on and on because while waiting for support files to install I moved on to another project just to come back 30 minutes later and to click next.
How to: Let Microsoft Create your Template Configuration.ini
The setup GUI walks us through all of the relevant questions for an installation of any type or combination and is also nice enough to expose the location of its Configuration.ini file. This can give you a perfect kick off point if you copy the file and save it as a template or modify only the options that matter.
Below is a screenshot of where you can get the file path of your configuration.ini file.
How to: Modify the Provided Configuration.ini File to Run Unattended
Now that you have the configuration file you have answered all of the relevant questions for the installation but there does need some modifications to make it truly ‘unattended’. The setup application won’t store passwords in the file by default and it will not provide the product key or accept the Microsoft terms and agreements either.
First you will want to edit your configuration.ini file to include IACCEPTSQLSERVERLICENSETERMS=”TRUE”, this is required so that you don’t have to be present to check the accept check box and you will also want to include PID=”insert_product_id_here” if your installation files do not already have the product key included.
I also recommend removing or commenting out (;) the UIMODE parameter and setting the following parameters:
This configuration will remove the GUI from your installation completely, auto advance through all options that have configuration values in them (which will be all of them), but still shows you that it’s working by printing out the steps that the installation is taking. If you set INDICATEPROGRESS=”FALSE” then your console will appear to sit idle while the installation is taking place, this personally drives me crazy so I prefer to see the text scrolling.
PRO TIP: If you are like me where you do a lot of work via Remote Desktop. Minimize the console window when the text is scrolling unless you want to check up on the progress. The text feed tends to bog down the RD session and make multi-tasking slow.
A sample installation string with all required parameters…
setup.exe /CONFIGURATIONFILE=”C:\Configuration.ini” /SQLSVCPASSWORD=”servicePW” /AGTSVCPASSWORD=”agentPW” /ASSVCPASSWORD=”ssasPW” /RSSVCPASSWORD=”ssrsPW” /SAPWD=”saPW”
You now have the basic tools to create your own unattended installation templates using the GUI / text editor. Check back next time for my PowerShell Unattended Install script for Stand-Alone and Clustered installs.