Silent install / Command line install of SQL Server 2005 Part 1

If you’ve read my articles, you know that I am a big fan of automation. I got a big kick out of seeing somebody else (in this case, machines) doing the real work;) With that in mind, I set out to automate the installation process of SQL Server 2005 September CTP.

SQL Server 2005 provides silent / command line installation. You have the option of setting all parameters in one command line and run it, or providing all settings in an .ini file. If you take the former approach, you will have a long command line to type and it is not easily reusable. If you take the later approach, you will have a config file to work with. It is reusable and customizable. Not surprisingly, I took the later approach.

So I read BOL for setup, looked through various parameters, and came up with my own .ini file. Here is the content of it:
[Options]
USERNAME=Alex
COMPANYNAME=Alex

[ADDLOCAL]
ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_DTS,Client_Components,Connectivity,SQL_Tools90,SQL_Profiler90,SQL_WarehouseDevWorkbench,SDK,SQLXML,Tools_Legacy,SQL_Documentation,SQL_BooksOnline,SQL_SQLServerBooksOnline,SQL_Samples,SQL_AdventureWorksSamples,SQL_Samples

[INSTANCENAME]
INSTANCENAME=MSSQLSERVER

[AUTOSTART]
SQLAUTOSTART=1
AGTAUTOSTART=1

[SECURITYMODE]
SECURITYMODE=SQL
SAPWD=MakeItAStrongPassword

Now I am all set to go. I ran this command, hoping I could go take a nap and have a sweet dream and when the dream is over it would be all done:
D:\SQL Server x86\Servers>setup /settings H:\TechnicalStuff\Database\MSSQL\SQL2005\Installation.ini qn

Surprise, about 2 seconds after I pressed the Enter key, up popped a Window asking me to install the prerequisites. I had to endure the pain of mindless clicking after all. Adding injury to insult, this process bombed out at the second step, installing Microsoft SQL Native Client:(

Suggestions to Microsoft: in the RTM CD/DVD, it would be very helpful to customers if you provide a sample setup .ini file for silent installation. But, if Microsoft does not do that, you can use my sample posted above as a start;)

Questions to you and Microsoft: is it possible to include installation of prerequisites components as part of silent install? Email me or add a comment if you know the answer.

Alas, I will try this again on a clean machine when I get a chance.

Stay tuned…

Utility to remove Beta 2 and previous CTPs

If you have previous Beta or CTP versions of SQL Server 2005 installed and you’d like to play with the September CTP, Microsoft provides an utility to cleanly remove the older version and .Net Framework. The utility is called sqlbuw.exe, located at CD-Rom\SQL Server x86\Tools\Setup Tools\Build Uninstall Wizard.

It worked great for me on both my laptop and desktop. On my laptop, I had Beta 2; on desktop, June CTP.