Silent install of SQL Server 2008
Are you having trouble installing SQL Server 2008 from the command prompt? I tried installing SQL Server Express 2008 by looking at the reference on MSDN. The trouble was it kept failing time and again and the screen disappeared faster than you can see what the error message was. Fortunately, the installer creates a Summary.txt file in the folder C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log. Opening the file will tell you exactly what the error message is.
But sometimes even this isn’t enough. In my case, I was quickly able to find that I needed PowerShell for installing SQL Server Express with Advanced Services – which was quickly fixed, but it kept failing with this exception -
Microsoft.SqlServer.Setup.Chainer.Workflow.NoopWorkflowException Message: No features were installed during the setup execution.
The requested features may already be installed.
Please review the summary.txt log for further details.
Our friend Google wasn’t of much help, so I decided to do a non-command line install to see if it was installing in the machine. It turns out, once you manually set all the configuration information, the installer creates a file called ConfigurationFile.ini and puts those settings there. This shows up in the Ready to Install step -
The installer then uses this file to do the actual install. Now, if you open the configuration file, you will find that these are the same settings you can set from the Command line. It looks something like this -
;SQLSERVER2008 Configuration File [SQLSERVER2008] ; Specify the Instance ID for the SQL Server features ... INSTANCEID="SQLExpress" ; Specifies a Setup work flow, like INSTALL, UNINSTALL, ... ACTION="Install" ; Specifies features to install, uninstall, or upgrade ... FEATURES=SQLENGINE,RS ... ...
You can then add all the name value pairs together to get the right command line arguments. Like so –
SQLEXPRADV_x64_ENU.exe /QUIET /INSTANCEID="SQLExpress" /ACTION="Install" /FEATURES=SQLENGINE,RS ...
There you have it – the right command line parameters to install SQL Server 2008 Express with Advanced Services silently from the command prompt. You can choose to remove some of the parameters that have default values or just leave them as they are – it doesn’t really matter.