Deploying SQL Server manually can be a lengthy and potentially error prone process as you work through all the different setup screens presented by the SQL Server Installation Center. If you want a standardized installation you need to be careful to enter all of the values the same every time. Plus, the installation process is interactive and it takes quite a while to complete. It’s not something where you can just press a button and walk away. Not to mention the fact that you can’t run it on Windows Server Core which can’t accommodate SQL Server Installation Manager’s graphical user interface. Fortunately, the SQL Server Installation Center provides the ability to generate a configuration file based upon the values you enter into the SQL Server Installation Center. You can then use the configuration file to deploy SQL Server in an unattended fashion with no user interaction using the same standardized configuration throughout the enterprise. In this article you’ll see how to create a SQL Server Configuration File and then use that Configuration File to perform an unattended installation of SQL Server 2014.
Creating a Standardized SQL Server Configuration Files
I created this example using the SQL Server 2014 SQL Server Installation Center but the process is essentially the same for SQL Server 2008 and higher. The SQL Server Installation Center doesn’t have a direct option to create a Configuration File. Instead you use the SQL Server Installation Center to launch the stand-alone installation setup wizard then you step through the wizard until you reach the Ready to Install screen where you can cancel the installation and generate a Configuration File. You can see the initial SQL Server installation screen in Figure 1.
Select the option to install a New SQL Server stand-alone installation or to add features to an existing installation option. While this example will illustrate how to create and use a Configuration File to install a standalone instance of SQL Server you should also note that you can also use Configuration Files to install SQL Server on a Failover Cluster as well as add or remove nodes to a Failover Cluster. After selecting the option to install a standalone SQL Server instance go ahead and follow the different dialogs presented by the setup wizard. For instance, in Figure 2 you can see where I selected the specific SQL Server features that I wanted to install.
Follow the wizard through to the Ready to Install page selecting the standard configuration options that you want to apply to the SQL Server installation. You can see the Ready to Install page shown in Figure 3.
The path to the configuration file is specified in the Ready to Install page in the Configuration file path section. To later use the Configuration File to install SQL Server cancel the setup without actually completing the installation. This will generate the file named ConfigurationFile.ini.
Installing SQL Server with a Configuration File
Once you’ve created the Configuration File you can edit a few of the parameters to create an unattended installation that doesn’t require any user input. The following listing summaries the changes to the ConfigurationFile.ini. First, comment out the UIMODE line. Then change the QUIET value to “True”. Next, change the SQLSYSADMINACCOUNTS to BUILTIN\ADMINISTRATORS. This allows it to be used more generically. However, you may want different values depending on your organization’s security requirements. Finally, add the line IACCEPTSQLSERVERLICENSETERMS=”True” to the end of the Configuration File. You can see a summary of the changes in the following listing.
After you’ve edited the Configuration File you can use the setup.exe program to install SQL Server using the values it contains like you can see below.
This runs setup.exe from the d: drive and the ConfigurationFile.ini is in the current directory. You should note that you can install SQL Server using just command line parameters and the command-line values will overwrite the values in the Configuration File. For more information about how to install SQL Server with a Configuration File you can check out Install SQL Server 2014 Using a Configuration File.