Friday, 28 August 2015

Use configuration file to install SQL Server 2012


Microsoft introduced a ‘Server Core’ version of Windows Server 2008 as basically a stripped down minimal installation option for the higher editions such as Standard, Enterprise and Datacenter.  It contains the features that are necessary to provide your users with all the usual Microsoft services such as Sql Server or Active Directory.

Here is a picture of the much simplified GUI in Windows Server 2012.



There are many reasons why Microsoft has provided us with this including reduced resource consumption, better security and less management.  On the flip side, quite often IT shot callers are sometimes reluctant to adopt this new version because it can seem scary to learn something new or a fear that troubleshooting an emergency with limited GUI could be risky.

Regardless of the pros and cons, I wanted to share a way of installing SQL Server 2012 that works well with Server Core or even on a full GUI Server version in a way that makes the install process of SQL Server much faster and as easy as clicking a batch file for users who don’t have much experience installing SQL Server 2012.  This method uses a file called the configuration file and this file is referenced at the command line prompt.

Where does a person get one of these configuration files?  A configuration file is just a text file that provides instructions on how the install should look.  It contains name/value pair parameters with comments that describe each line.





The file can be generated by stepping through a normal installation using the regular installation media but an option to completing the install is to just stop at the ‘Ready to Install’ page and noting the path to the config file at the bottom of the page as seen below.



Once you cancel the installation, the INI file is generated.  Move the newly created config file to the location where you want to start the installation.
The only way to install SQL Server by using the config file is at the windows CMD prompt.
At the CMD prompt type in the following command referencing the config file you just generated.

Setup.exe /ConfigurationFile=MyConfigurationFile.INI

Obviously there are many flags and switches and options that a person can include in this command to change things like the Silent Mode or to accept the licence term etc.  You can edit the config file as needed and once you start the install then it will complete unattended if you include the QUIET =’True’. 

You can see where this would save a DBA responsible for installing SQL Server on many hosts a lot of time.

You can learn more on this topic at Technet.

Thanks for reading,
SQL Canuck



No comments:

Post a Comment