Tuesday, May 24, 2011

SQL Server–Automated Setup

I know that there are many articles in Microsofts knowledge base about how to do automatic installation of SQL Server, but as I get pounded with this question time and again I figured it might be a worthy topic to start a blog. So here it is… Automatic SQL Setup, reduced to the ultimately necessary steps: (Actually it’s only one step.)


/SQLSvcAccount=<SQL Server User>

/SQLSvcPassword=<SQL User password>

/AGTSvcAccount=<SQL Agent User>

/AGTSvcPassword=<SQL Agent password>





Not that complicated now, is it?

OK, maybe I need to clarify some things here:

  1. The Parameter INSTANCENAME obviously holds the name of a named instance. If you specify MSSQLServer setup will install the default instance.
  2. What the hell is AutoConfig.ini and how do you create it? Well, you can of course follow the pages of books online and create one yourself, but I would not recommend it, as there is a far easier method: On a clean machine run through the setup wizard with the configuration you like to have. After Setup has finished you will find a ConfigurationFile.ini in the C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\<Timestamp> directory. All you have to do from there is change either “Quiet” or “QuietSimple” to true and you are done.
  3. Just to clarify: “Quiet” means that setup will run silent, without any UI. “QuietSimple” means that no questions are asked, but the progress of Setup is still displayed in the setup wizard style.

Now… This is how you do Setup automatically… So, if you can do this now, wouldn’t it be nice if setup would allow you to also install the latest Service Pack and Cumulative Update pack in the same run? Well, you can do that too, but that’s another story. (One that I will for sure tell in a short while.)