Sunday, 23 September 2012

SQL Server 2012 Silent Unattended Installation

Question: Many times we have installed SQL Server 2012, 2008 & 2005 using the traditional UI Mode, how can we install the same using Silent Install Mode.


Solution: In this is post we will be installing a 2012 SQL Server Named Instance (DR) using the Silent Mode from command prompt with a configuration file.

We will install the below features as part of this post.

Parent feature parameter Feature parameter Description
SQL   Installs the SQL Server Database Engine, Replication, Fulltext, and Data Quality Server.
  SQLEngine Installs just the SQL Server Database Engine.
  Replication Installs the Replication component along with SQL Server Database Engine.
  FullText Installs the FullText component along with SQL Server Database Engine.
  DQCopies the files required for completing the Data Quality Server installation. After completing SQL Server installation, you must run the DQSInstaller.exe file to complete the Data Quality Server installation. For more information, see Run DQSInstaller.exe to Complete Data Quality Server Installation. This also installs SQL Server Database Engine.


We can change the configuration file according to our required services and features.

Below link will be useful to check the SQL Server Installation Parameters and other related stuff.

http://msdn.microsoft.com/en-us/library/ms144259.aspx

Step 1 : Prepare a configuration File for SQL Server Installation

Save the below parameters in a text file as "ConfigurationFile_Silent_Named_Instance.ini", change/add parameters as per you environment requirement. As per testing requirement I am only installing SQL Server Database Engine Features (Named Instance), you can check above link and add all SQL Server Shared Features if the same are not installed on the box.

[OPTIONS]
ACTION="Install"
ENU="True"
;UIMODE=Normal
IACCEPTSQLSERVERLICENSETERMS="TRUE"
;QUIET="FALSE"
QUIETSIMPLE="TRUE"
UpdateEnabled="False"
FEATURES=SQLENGINE,REPLICATION,FULLTEXT,DQ
UpdateSource="MU"
HELP="False"
INDICATEPROGRESS="False"
X86="False"
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
INSTANCENAME="DR"
INSTANCEID="DR"
SQMREPORTING="False"
ERRORREPORTING="False"
INSTANCEDIR="I:\Microsoft SQL Server"
AGTSVCACCOUNT="NT Service\SQLAgent$DR"
AGTSVCSTARTUPTYPE="Automatic"
COMMFABRICPORT="0"
COMMFABRICNETWORKLEVEL="0"
COMMFABRICENCRYPTION="0"
MATRIXCMBRICKCOMMPORT="0"
SQLSVCSTARTUPTYPE="Automatic"
FILESTREAMLEVEL="0"
ENABLERANU="False"
SQLCOLLATION="Latin1_General_CI_AI"
SQLSVCACCOUNT="NT Service\MSSQL$DR"
SQLSYSADMINACCOUNTS="murali-HP\murali"
SECURITYMODE="SQL"
SAPWD="sapassword"
ADDCURRENTUSERASSQLADMIN="False"
TCPENABLED="1"
NPENABLED="0"
BROWSERSVCSTARTUPTYPE="Automatic"
FTSVCACCOUNT="NT Service\MSSQLFDLauncher$DR"

Step 2 : Start the SQL Server setup.exe from command prompt with the configurationfile option.

G:\Software\SQL Server 2012\SQLFULL_x64_ENU>setup.exe /CONFIGURATIONFILE="I:\SQL Server Own Material\scripts\Configurati
onFile_Silent_Named_Instance.ini"


After executing the above command SQL Server Installation will be in progress and the above command will be completed once the installation id done.

Step 3 : Check the related logfiles of the installation typically located in "C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log" and access the newly installed SQL Server