Unattended SQL 2012 installation

This post describes how make unattended installation for SOL-server 2012 SP1

Prerequisites:

  • .NET 3.5 SP1
  • .NET 4.0

There are two options to install SOL-server from a command line. One is to put all options to one command (like Setup.exe /q….) and second one is to use configuration file. This blog posting describes how to build up own configuration file for first time use and how to modify it.

Building up the configuration file:

  1. Run SOL-server setup normally
  2. Set all settings as needed during the installation
  3. On “Ready to install” install page see the path for Configuration file on bottom of screen (see picture)

SQL_Ready_to_install

  1. Cancel the setup
  2. Browse the directory where configuration.ini file is and open it

Modifying the configuration file:

  • First of all you have to add IACCEPTLICENSETERMS=”TRUE” to accept license tems in a unattended installation.
  • If run on a QUIET mode remove UIMODE=normal or use semicolon to comment the value as a inactive.
  • QUIETSIMPLE shows GUI with out user any user interaction and QUIET for silent installation
  • If you want use SQL (mixed mode) you have to add SAPWD value for sysadmin password.
  • for Debugging silent installation (first time use) set INDICATEPROGRESS value as a TRUE

Running the setup with configuration.ini

 

Example Configuration file.

[table caption=”SQL Configuration.ini” width=”700″ colwidth=”20|100″ colalign=”left|left” ]
row, text
1,;SQL Server 2012 Configuration File
2,[OPTIONS]
3,;Accept License Terms
4,IACCEPTSQLSERVERLICENSETERMS=”TRUE”
5,; Specifies a Setup work flow like INSTALL UNINSTALL or UPGRADE. This is a required parameter.
6,ACTION=”Install”
7,; Detailed help for command line argument ENU has not been defined yet.
8,ENU=”True”
9,”; 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.”
10,;UIMODE=”Normal”
11,; Setup will not display any user interface.
12,QUIET=”False”
13,”;Setup will display progress only, without any user interaction.”
14,QUIETSIMPLE=”True”
15,”;Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found.”
16,;UpdateEnabled=”True”
17,”; 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. ”
18,”FEATURES=SQLENGINE,FULLTEXT,SSMS,ADV_SSMS”
19,”; Specify the location where SQL Server Setup will obtain product updates. The valid values are “”MU”” to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update or a Windows Update service through the Window Server Update Services. ”
20,”UpdateSource=””MU”””
21,; Displays the command line parameters usage
22,”HELP=””False”””
23,; Specifies that the detailed Setup log should be piped to the console.
24,”INDICATEPROGRESS=””False”””
25,; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system.
26,”X86=””False”””
27,; Specify the root installation directory for shared components.  This directory remains unchanged after shared components are already installed.
28,”INSTALLSHAREDDIR=””C:\Program Files\Microsoft SQL Server”””
29,; Specify the root installation directory for the WOW64 shared components.  This directory remains unchanged after WOW64 shared components are already installed.
30,”INSTALLSHAREDWOWDIR=””C:\Program Files (x86)\Microsoft SQL Server”””
31,”; 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). ”
32,”INSTANCENAME=””MSSQLSERVER”””
33,”; 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. ”
34,”INSTANCEID=””MSSQLSERVER”””
35,; 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.
36,”SQMREPORTING=””False”””
37,; 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.
38,”ERRORREPORTING=””False”””
39,; Specify the installation directory.
40,”INSTANCEDIR=””C:\Program Files\Microsoft SQL Server”””
41,; Agent account name
42,”AGTSVCACCOUNT=””CONTOSO\Agentsvc”””
43,”AGTSVCPASSWORD=””Pa$$w0rd”””
44,; Auto-start service after installation.
45,”AGTSVCSTARTUPTYPE=””Manual”””
46,; CM brick TCP communication port
47,”COMMFABRICPORT=””0″””
48,; How matrix will use private networks
49,”COMMFABRICNETWORKLEVEL=””0″””
50,; How inter brick communication will be protected
51,”COMMFABRICENCRYPTION=””0″””
52,; TCP port used by the CM brick
53,”MATRIXCMBRICKCOMMPORT=””0″””
54,; Startup type for the SQL Server service.
55,”SQLSVCSTARTUPTYPE=””Automatic”””
56,”; Level to enable FILESTREAM feature at (0, 1, 2 or 3). ”
57,”FILESTREAMLEVEL=””0″””
58,”; Set to “”1″” to enable RANU for SQL Server Express. ”
59,”ENABLERANU=””False”””
60,; Specifies a Windows collation or an SQL collation to use for the Database Engine.
61,”SQLCOLLATION=””SQL_Latin1_General_CP1_CI_AS”””
62,; Account for SQL Server service: Domain\User or system account.
63,”SQLSVCACCOUNT=””CONTOSO\sqlsvc”””
64,”SQLSVCPASSWORD=””Pa$$w0rd”””
65,; Windows account(s) to provision as SQL Server system administrators.
66,”SQLSYSADMINACCOUNTS=””SQLDEMO\Administrator”” “”CONTOSO\Domain Admins”””
67,”; The default is Windows Authentication. Use “”SQL”” for Mixed Mode Authentication. ”
68,”SECURITYMODE=””SQL”””
69,; Set SA password
70,”SAPWD=””P@ssword123!”””
71,; Provision current user as a Database Engine system administrator for SQL Server 2012 Express.
72,”ADDCURRENTUSERASSQLADMIN=””False”””
73,; Specify 0 to disable or 1 to enable the TCP/IP protocol.
74,”TCPENABLED=””1″””
75,; Specify 0 to disable or 1 to enable the Named Pipes protocol.
76,”NPENABLED=””0″””
77,; Startup type for Browser Service.
78,”BROWSERSVCSTARTUPTYPE=””Disabled”””
79,; Add description of input argument FTSVCACCOUNT
80,”FTSVCACCOUNT=””NT Service\MSSQLFDLauncher”””
[/table]

Leave a Reply

Your email address will not be published. Required fields are marked *