SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Performing Unattended Installs of SQL Server 2012

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 
    /SQLSYSADMINACCOUNTS = "<YourDomain\Administrator>"

    These command parameters are explained as follow:

    Indicates the action to be performed.
    Indicates that Setup runs and shows the installation progress. It accepts no input.
    Indicates required instance name.
    Required to acknowledge acceptance of the license agreement.
    Required to specify individual SQL Server components to install.
    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:


  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"
    • Set – SQLSYSADMINACCOUNTS="YourDomain\Administrators"
    • 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 :)

Basit's SQL Server Tips

Basit Farooq is a Lead Database Administrator, Trainer and Technical Author. He has more than a decade of IT experience in development, technical training and database administration on Microsoft SQL Server platforms. Basit has authored numerous SQL Server technical articles, and developed and implemented many successful database infrastructure, data warehouse and business intelligence projects. He holds a master's degree in computer science from London Metropolitan University, and industry standard certifications from Microsoft, Sun, Cisco, Brainbench, Prosoft and APM, including MCITP Database Administrator 2008, MCITP Database Administrator 2005, MCDBA SQL Server 2000 and MCTS .NET Framework 2.0 Web Applications.


Leave a comment on the original post [basitaalishan.com, opens in a new window]

Loading comments...