I wrote about unattened install of SQL Server 2008 R2 here, where all parameters were entered on the command line directly.
Another way, perhaps a better way, of automation is to put all parameters in a configuration file. Here is a sample:
[sourcecode language=”text”]
[SQLSERVER2008]
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION=”Install”
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, and Tools. The SQL feature will install the database engine, replication, and full-text. The Tools feature will install Management Tools, Books online, Business Intelligence Development Studio, and other shared components.
FEATURES=SQL,Tools
INSTANCENAME=MSSQLSERVER
SQLSVCACCOUNT=”NT AUTHORITY\SYSTEM”
SQLSYSADMINACCOUNTS=”.\Administrator”
AGTSVCACCOUNT=”NT AUTHORITY\Network Service”
;INSTANCEDIR=c:\SQLServer
[/sourcecode]
Here is how to use it:
[sourcecode language=”text”]
setup.exe /ConfigurationFile=SQL2008R2InstallConfig.txt /QS /IACCEPTSQLSERVERLICENSETERMS
[/sourcecode]
One thing is worth of mentioning: installer creates a directory called MSSQL10_50.MSSQLSERVER under your INSTANCEDIR for the default instance. For a named instance, say Instance1, it will be MSSQL10_50.Instance1. The installer adds the MSSQL10_50. prefix and it does not look like it can be helped.
One response to “SQL Server 2008 R2 unattended installation via configuration file”
[…] https://www.haidongji.com/2010/10/07/sql-server-2008-r2-unattended-installation-via-configuration-fi… […]