http://www.sqlservercentral.com/blogs/basits-sql-server-tips/2012/08/02/performing-unattended-installs-of-sql-server-2012/

Printed 2014/07/31 08:17PM

Performing Unattended Installs of SQL Server 2012

2012/08/02

In my post here, I’ve discussed the procedure to perform attended installation of SQL Server 2012 on a Windows Server 2008.

Now imagine, you have multiple SQL Server 2012 instances to install with the same configuration on the multiple servers and you want this task to be done as quickly and consistently as possible. When this is the case, you may choose the unattended installation option. SQL Server unattended installation option lets administrators install SQL Server on multiple machines with little or no user interactions. SQL Server 2012 unattended installations can be done using command line parameters or configuration files. All SQL Server step-up screen entries and the dialog responses are made automatically by using information stored in the configuration file or by command-line parameters.

This article shows you the steps to perform unattended installation of SQL Server 2012 on a Windows Server 2008 system by using command line and configuration file.

Unattended SQL Server 2012 Installation From the Command Line

Follow the steps below, to perform new unattended installation of SQL Server 2012 instance on a Window Server 2008 from the command line:

  1. Logon to server as Administrator and then start the Command Prompt or Start the Command Prompt with elevated administrative privileges by right-clicking the Command Prompt icon in Programs list, and then click Run as Administrator:

    Path: Start > All Programs > Accessories > Command Prompt

    The Command Prompt window opens:

  2. The following is the command syntax which you can use to perform the unattended installation of SQL Server Database Engine and SQL Server Management Studio tools:

    <Installation media location>\setup.exe 
    /ACTION=install 
    /QS 
    /INSTANCENAME="<MachineName\InstanceName>" 
    /IACCEPTSQLSERVERLICENSETERMS = 1
    /FEATURES=SQLENGINE,SSMS
    /SQLSYSADMINACCOUNTS = "<YourDomain\Administrator>"

    These command parameters are explained as follow:

    /ACTION
    Indicates the action to be performed.
    /QS
    Indicates that Setup runs and shows the installation progress. It accepts no input.
    /INSTANCENAME
    Indicates required instance name.
    /IACCEPTSQLSERVERLICENSETERMS
    Required to acknowledge acceptance of the license agreement.
    /FEATURES
    Required to specify individual SQL Server components to install.
    /SQLSYSADMINACCOUNTS
    Required to specify members of the sysadmin role.

    Click here to view the complete list of command line parameters.

    I executed the following command in the command line to perform stand-alone installation of SQL Server 2012 instance called UnattendedCmd, with the SQL Server Database Engine, Replication, and Full-Text Search components:

    F:\setup.exe 
    /ACTION=install 
    /QS 
    /INSTANCENAME="UnattendedCmd" 
    /IACCEPTSQLSERVERLICENSETERMS=1
    /FEATURES=SQLENGINE,SSMS 
    /SQLSYSADMINACCOUNTS="IITCUK\SQLAdministrator"
    

  3. Once the installation is completed, Launch SQL Server Configuration Manager or connect to instance via SQL Server Management Studio to verify installation (see below):

Unattended SQL Server 2012 Installation From a Configuration File

  1. The first step of the process is to create a configuration file which the SQL Server 2012 installer will use to answer all installation questions in a silent mode. To do that, insert the SQL Server installation media or locate the installation media on the network share. From the root folder, double click Setup.exe.
  2. This Launches SQL Server Installation Center. Specify the options and parameters for your SQL Server 2012 installation by following the setup wizard until the Ready to Install screen and then simply cancel the installation at Ready to Install screen (see below):

    Remember: Make a note of the configuration file path on this final screen.

  3. Open Windows Explorer and navigate to the folder where the configuration file is found:

  4. Search ConfigurationFile.ini and copy it to a folder that can be used for unattended installations. For the purpose of this demo, I’m copying it to D:\ConfigurationFiles\ (see below):

  5. Now modify ConfigurationFile.ini to prepare the file for unattended installation:

    • Set – QUIET="True"
    • Add – IACCEPTSQLSERVERLICENSETERMS="True"
    • Set – SQLSYSADMINACCOUNTS="YourDomain\Administrators"
    • Remove – ADDCURRENTUSERASSQLADMIN="False"
    • Remove – UIMODE="Normal"
  6. The last step is to use the configuration file with the command prompt for an installation of SQL Server 2012. To do that, open a command prompt and navigate to the location of the installation media and then execute the following command to perform the unattended installation of SQL Server 2012 using ConfigurationFile:

    <Installation media location>\Setup.exe /ConfigurationFile=<Configuration file location> /Q

  7. Once the installation is completed, Launch SQL Server Configuration Manager or connect to instance via SQL Server Management Studio to verify installation.

I hope you will find the information of this post useful :)



Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.