Got an event that needs shooting?  I've covered multiple events for marathon-photos.com and can capture the scenes & emotions that make your event unique.

Some samples of my own work are at Digital Formula on Flickr.

 

Do you or your business need a website but you're unsure where to start?  Get in touch now and we'll get it sorted.

I focus on usable functionality & can setup smaller sites using Wordpress within hours of the order being placed.  Magic!

 

So, you've already got a website but need help managing it?  I can help you.

Don't worry about knowing every single detail.  I'll find out the most important stuff and work with you to reach your goal, not someone else's.

said on twitter: According to Google Analytics traffic to my site is up 804.14% … that seems like quite a lot to me.

 
21 comments
Short URL

SQL Server 2008 Express Unattended Install

One-click goodness

On the previous version of Digital Formula I wrote an article called "How to perform an unattended installation of SQL Server 2005 Express". With the release of SQL Server 2008 it's time to write another one about how to do the same but for SQL Server 2008 Express. So, let's get started ...

Unattended installations of SQL Server can be as involved as you want - pretty much every option can be specified in the configuration file. For this example I’m going to perform a relatively basic installation with minimal customisation so you can see the process at work. The installation will specify most of what I think are the critical options you'll be interested in. Note that for this example I'm using the x86 (32-bit) version with advanced services.

Assumptions

Required Files

  • Run the executable you downloaded with the /x parameter (e.g. C:\Install\SQL2008\SQLEXPRADV_x86_ENU.exe
  • Choose a location to extract the installation files to.
  • Create a new text file that will become the unattended installation configuration file. Leave it empty for now.

Configuration Files

So, you can now create your own configuration file using Microsoft's documentation or you can use the version I've included in this article.

Be careful with the Microsoft documentation as there is an error on the page called How to: Install SQL Server 2008 from the Command Prompt. It mentions a parameter called /BROWSERSVRACCOUNT but this should be /BROWSERSVCACCOUNT. If you get this wrong the installation WILL fail.

You can download the configuration file I've made below. The changes I've made are as follows (you may need to change these to match your settings).

  • Set the QUIETSIMPLE parameter to "True".
  • Set the MEDIASOURCE parameter to the appropriate installation path.
  • Added a parameter called SAPWD and set it to the strong 'sa' password.
  • Set the INDICATEPROGRESS parameter to "True".
  • Set the SQLSYSADMINACCOUNTS value to "MYPC\Administrator".

Once you have your answer file all nicely setup and ready to use you’ll need to tell the setup program how to use it.

Run the script

From a command prompt (or Start > Run if you’re into that) run the following command. Remember to change the file and path names to the ones that match your system.

C:\Install\SQL2008\setup.exe /CONFIGURATIONFILE=C:\Install\sql-2008-express.ini

If you’ve done everything right this will start the installation process and you’ll end up with a SQL Server 2008 instance called SQLExpress running on your system. Easy!

» Tags: silent, sql server 2008 express, Unattended, sql server 2008, sql 2008, sql 2008 express

Words of wisdom

The SQL Server 2008 Installation GUI will also create the ConfigurationFile.ini for you but with the release of SQL Server 2008 R2, by default the ConfigurationFile.ini is not created when installing the Express version.
Nick Olsen  on August 17, 2010
Check out my blog on an unattended SQL 2008 R2 installation with scripts.http://derek858.blogspot.com/2010/07/unattended-sql-2008-r2-scripts.html
Derek  on July 05, 2010
Ryan: I've just a quick search and to be honest I can't find much about how to specify the IP address during an unattended installation. Unfortunately I'm not using a system that I can test this on at the moment either - apologies!
chris  on March 09, 2010
We're getting stuck at the ip config part it seems to want to use DHCP (which we do not have setup on the subnet) and the answer file doesn't specify an ip for the SQL instance to run on.Does anyone know the flag or line we need to add that?
Ryan  on March 06, 2010
Ok i have the solution. You must add the dynamic-information in the command-prompt. Example:/INSTANCEDIR=%ProgramFiles%\Microsoft SQL Server ->
Martin  on March 06, 2010
Is there a possibility to make the Installation dynamic??? That means that the Installpath is different in XP and 7. Can I use %ProgramFiles% or something to make this path dynamic???Greets Martin
Martin  on March 06, 2010
Full script updated by comparison with a ConfigurationFile generated during a manul instalation:
Rui  on February 18, 2010
Rui: What did you change to make this work?
chris  on February 18, 2010
Manually I was able to instal both under Win 7 and Win Server 2008 R2 and your script failed in both systemsI updated the script and now it works with the same command file.
Rui  on February 18, 2010
Yes Chris manually I was able to instal both under Win 7 and Win Server 2008 R2 and your script failed in both systemsI updated the script and now it works with the same command file:
Rui  on February 18, 2010
Rui: I assume SQL Server Express x64 w/ SP1 installs correctly on your machine when you run the installer manually?
chris  on February 17, 2010
I am trying to install this on Win 7 x64 Ultimate. The installer exits after displaying a sucess message from the instalation of the support files but it does not move to the next step.
Rui  on February 17, 2010
Rui: Nope I haven't. But I also write this article back when I was doing this stuff regularly - I haven't used it since then as I left that site not long afterwards. I see no reason why it wouldn't work for x64 though - it's the same product with a different build that's all. Is there nothing in your event log or any of the SQL server installation logs? If there is a failure or error it should be recorded somewhere.
chris  on February 17, 2010
The installer exits without any messages. Have you tried the script with the x64 SP1 version?
Rui  on February 17, 2010
Rui: Do you get any error messages when the Windows Installer exits? There are logs created by the SQL server installation process - have a look at http://msdn.microsoft.com/en-us/library/ms143702.aspx for information about how to read them. Hope that helps!
chris  on February 17, 2010
Hello ChrisI have been trying to use your script to automate the instalation of SQL Server Express x64 SP1 but the windows installer exits before the end and doesn't produce the desired outcome. Any ideas? Thank you
Rui  on February 17, 2010
Aritz: What do you mean? Do you mean can you include existing databases during installation?
chris  on January 14, 2010
Thanks!I have question:Can you include some how initial databases during installation time like (.mdf or .bak?)
Aritz R  on January 14, 2010
helloChris.thank you for your instructions.now this script WORK well. but my sql server 2008 express is japanese version. the datebase date is not correctely showing . maybe the code is not right. where i should modify the script? thank you.
jacky  on August 07, 2009
foxjazz - The steps above DO work but I have found a problem with the unattended installation file. If you were using the file I made available for download you are correct it would not have worked. The change was setting the AGTSVCSTARTUPTYPE value to Manual instead of True. Don't forget to also change MYPC\Administrator to the appropriate credentials for your system. Thanks.
chris  on May 23, 2009
These instructions DO NOT WORK I have spent 2 hours trying to figure out why this doesn't work and no luckWhat do I do now?
foxjazz  on May 23, 2009

Hi!  Care to leave a comment?

Remember my personal information

Notify me of follow-up comments?

Please enter the word you see in the image below:


 

Digital Formula (that's ME!)

 

 
DigitalFormula is an experiment in HTML5 and CSS3 design by Chris Rasmussen, an amateur/casual designer based in Melbourne, Australia. -37.813611 144.963056