How Does Unattended Install Work?

Automating the installation of SQL Server Express, also known as an unattended install, is done by launching the setup process via the command line and passing pre-determined parameters so that no human interaction is needed to complete the setup. This is ideal for any situation where many servers must be provisioned and a requirement when bundling SQL Server Express with other software using it as a database.

The configuration for the install can be input directly as parameter to the setup file, like

Setup.exe /ACTION="Install"

or passed in via a configuration file:

Setup.exe /ConfigurationFile=MyConfigurationFile.INI  

Using a configuration file makes it easy to store, maintain, and customize the various parameters that may change based on SQL Server version, install type, and target server. For this reason, the below configurations will be provided as template files that can be tailored to any additional needs.

Unattended Installs for SQL Server Express

Installing SQL Server Express from a configuration file has a few differences when compared to other versions like Standard and Enterprise. Some of the parameters behave slightly differently, do not apply, and come with different default values. These examples take those factors into account by having all mandatory fields present and optional settings commented out to provide a generic template that can be customized as needed.

2016/2017 Unattended Install

The newest versions of SQL Server Express have a configuration file that is very similar to prior versions, with the addition of two new optional parameters:

SQLTEMPDBFILESIZE

This parameter allows the default size of all new tempdb data files to be specified at the time of installation. While the default for SQL Server Express is a paltry 4MB and all other versions are set to 8MB, customizing this value reduces the number of post-install steps required since most servers will require more than a few MB of space for the tempdb.

SQLTEMPDBLOGFILESIZE

Similar to the above, the size of the tempdb log can also now be specified during the installation process. The defaults of 4MB and 8MB are the same, so most people will want to specify a larger value.

The below sample configuration file focuses solely on the database engine installation and does not include other features to keep the configuration as generic as possible.

2008, 2012, 2014 Unattended Install

The configuration parameters change very little over the years, mostly with new options being added and very few being modified or removed. Luckily, this means that the same configuration file can often be used for multiple version installs, as long as the general requirements of each install remain the same.

The below sample configuration file focuses solely on the database engine installation and does not include other features to keep the configuration as generic as possible.

Further Reading