SQLServerCentral Article

Unattended Installation

,

This article will provide the step by step process for installing SQL Server using unattended mode. With this we can standardize the SQL Server installation for an organization and minimize the efforts during the installation process. When we have to install more number of instances on different servers we can perform the task in parallel by opting unattended mode of installation which is detailed in the next steps.

Prerequisites

We need configurationfile.ini for unattended installation. In configurationfile.ini we can include the required server names when we are installing SQL on n no of servers in parallel.

Process

Capturing the Configurationfile.ini is a onetime activity. We can use this file as a template for all further new installations. In order to get the configurationfile.ini we need to run the installation wizard manually initially so that you can define the settings as per the org standards.

Note: Here during this process we should click on install button.

The below picture shows the path where the configuration file is located when we install SQL Server:

The location of file will be at C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\Folder with date and time of installation and configuration file name is Configurationfile.ini 

Using the Configurationfile.ini for Unattended Installation

In order to make use of this file for future installations, we need to tweak the file with the required specifications. The below setting ensures no UI is involved.

; Parameter that controls the user interface behavior. Valid values are Normal for the full UI,AutoAdvance for a simplied UI, and EnableUIOnServerCore for bypassing Server Core setup GUI block. 
; UIMODE="Normal"

The below setting is used to make sure the installation will run at the background.

In this setting, we can specify the required features which needs to be part of SQL Installation like SQLEngine, Replication, BIDS, SSIS, SSRS, and SSAS etc. 

; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. The Tools feature will install Management Tools, Books online components, SQL Server Data Tools, and other shared components. 
FEATURES=SQLENGINE,REPLICATION,AS,RS,BIDS,CONN,IS,BC,SDK,BOL,SSMS,ADV_SSMS,SNAC_SDK

We specify the Root directory for shared components at the following location:

; Specify the root installation directory for shared components.  This directory remains unchanged after shared components are already installed. 
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"

The below setting is for the instance name selection, either default or a named instance. If it is the default instance, list it as MSSQLServer. If it is a named instance, include the instance name. Here in the below screen the instance name is set to ‘TRYINGUNATTEND’.

; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS). 
INSTANCENAME="TRYINGUNATTEND"

Mention the InstanceID. In general it will be same as instance name.

; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance. 
INSTANCEID="TRYINGUNATTEND"

If we want to send the SQL Server feature usage data to Microsoft, we can opt it at the following location by giving a value of either ‘True’ or ‘False’.

; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to enable and 0 or False to disable this feature. 
SQMREPORTING="False"

For collecting Error reports and sending to Microsoft, the below setting will help us. We can select True or False depending on the need.

; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature. 
ERRORREPORTING="False"

The above two settings give an option for Microsoft to debug when we encounter some issues with the SQL Server.

If we want to install in a specific directory, we can specify the same in the below setting.

The below setting is to provide the service account information and start up type for the SQL Server Agent services and Integration services:

Provide the service account information and start up type for SQL Server services.

Select the Collation settings.

Provide the user, or group, name who needs sys admin privileges by default.

Select the Authentication mode (Windows / Mixed) with Windows or SQL.

The below settings are to change the system databases, user databases and tempdb directories, according to organizational standards:

Specify which type of protocol required for the instance:

Specify the start up type for SQL Browser services.

After modifying all the required information, save this file in the location where we have the SQL Server software dump. Run the below command to start the SQL server installation. In the command we need to mention the SA password if you have selected mixed mode authentication. Also we need to mention the service accounts password according to our feature selection as in the above screens.

C:\Users\abcd\Downloads\SQLFULL_x86_ENU>Setup.exe /ConfigurationFile="ConfigurationFile.ini" /IAcceptSQLServerLicenseTerms="TRUE" /SQLSVCPASSWORD="SQLServiceaccount Password” /AGTSVCPASSWORD="sql agent service account password" /ASSVCPASSWORD="Analysys service account password" /ISSVCPASSWORD="Intigration service account password" /RSSVCPASSWORD="Reporting Service account password" /sapwd="SA account password" /IAcceptSQLServerLicenseTerms="TRUE"

By running the above command, the SQL server installation will run in the background, and if any error is encountered, it will display on the screen. If there are no errors during the installation the process completes and give a completed message.

If we encounter any issues during the installation process, an error message will be displayed like the one below:

Once after installation screen will be shown like this:

Resources

Rate

3.08 (13)

You rated this post out of 5. Change rating

Share

Share

Rate

3.08 (13)

You rated this post out of 5. Change rating