Thursday, 17 June 2010

Unattended Installation

It takes a fair while to install SQL Server 2008 using the GUI. Clicking next through screen after screen, waiting for each form to validated. This is a nuisance particularly if you're installing more than one instance. An Unattended install is the answer to this, below is a configuartion file that will install a default instance. The rest of the file is self explantory.

It's invoked on the command with:
 
setup.exe /configurationfile=c:\temp\sql_install.ini

;SQLSERVER2008 Configuration File
;This is a standard non-clustered installation

[SQLSERVER2008]

; Sepcify the InstanceID for directory and registry structures and service names
INSTANCEID="mssqlserver"

; Specify The Instance Name (or 'mssqlserver' for adefault Instance)
INSTANCENAME="mssqlserver"

; Specify installer Action (INSTALL, UNINSTALL, or UPGRADE)
ACTION="Install"

; Specify features to Action
FEATURES=SQL,Tools,SQLENGINE,REPLICATION,FULLTEXT,BIDS,CONN,IS,BC,SDK,BOL,SSMS,ADV_SSMS,SNAC_SDK,OCS

; Display the command line parameters usage
HELP="False"

; Specifies that the detailed Setup log should be piped to the console.
INDICATEPROGRESS="True"

; Do not display the user interface.
;QUIET="True"

; Show progress only
QUIETSIMPLE="True"

; Specify that Setup should install into WOW64. Supports x64 Only.
X86="False"

; Specify path to the install media
MEDIASOURCE="C:\Install Files\en_sql_server_2008_enterprise_x86_x64_ia64\"

; Do not send error reports to Microsoft
ERRORREPORTING="False"

; Do not send feature usage data to Microsoft
SQMREPORTING="False"

; Install directory for shared files and components
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"

; Install directory for the WOW64 stuff
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"

; Specify the installation directory.
INSTANCEDIR="C:\Program Files\Microsoft SQL Server"

; Configure SQL Server Agent service
AGTSVCACCOUNT="pkrtest\sqladmin"
AGTSVCPASSWORD="v4OVdj8I"
AGTSVCSTARTUPTYPE="Automatic"

; Configure Integration Services service.
ISSVCACCOUNT="NT AUTHORITY\NetworkService"
ISSVCSTARTUPTYPE="Automatic"

; Configure SQL Server service.
SQLSVCACCOUNT="pkrtest\sqladmin"
SQLSVCPASSWORD="v4OVdj8I"
SQLSVCSTARTUPTYPE="Automatic"

; Configure SQL SErver Browser Service.
BROWSERSVCSTARTUPTYPE="Automatic"

; Configure Full Text Service
FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"

; Specify Collation settings.
ASCOLLATION="Latin1_General_CI_AS"
SQLCOLLATION="Latin1_General_CI_AS"

; Analysis Services file locations.
ASDATADIR="Data"
ASLOGDIR="Log"
ASBACKUPDIR="Backup"
ASTEMPDIR="Temp"
ASCONFIGDIR="Config"

; Enable the Network Protocols
TCPENABLED="1"
NPENABLED="0"

; Enable Mixed Mode security.
SECURITYMODE="SQL"
SAPWD="2manysecrets!"

; Do not enable FILESTREAM
FILESTREAMLEVEL="0"

; Specifies whether or not the MSOLAP provider is allowed to run in process.
ASPROVIDERMSOLAP="1"

; Windows account(s) to provision as SQL Server system administrators.
SQLSYSADMINACCOUNTS="PKRTEST\wils01mgmt" "PKRTEST\benn01mgmt"


You can also install a named instance using this file, by changing these two lines to the new instance name:


; Sepcify the InstanceID for directory and registry structures and service names
INSTANCEID="new_instance_name"

; Specify The Instance Name (or 'mssqlserver' for adefault Instance)

INSTANCENAME="new_instance_name"


And that's it, now you have a default instance installed with the least amount of fiddling inside the GUI.