Thursday, June 19, 2008

SQL Server 2005 Express Edition on Windows 2008 x64

While experimenting with the Microsoft App-V 4.5 Release Candidate (more on that soon), I decided to go for a full-blown installation on Windows 2008 x64. Since this is only on my home network, I don't run a dedicated SQL server so I went for the natural choice of installing SQL Server 2005 Express Edition SP2 on my freshly installed Windows 2008 x64 App-V server.

This turned out to be less trivial than I thought. The short answer is: if you want to have a painless install of SQL Server 2005 Express Edition, take the download that includes the “Advanced Services” and simply don’t install them. The “smaller” download package does not include some necessary files for a successful x64 installation.

If you want to go the hard way and patch the setup for easier automated deployment (or just to be ‘1337 and be able to say that you fixed Microsoft’s SQL Server installer for 64-bit systems…), then follow these steps:

  • First of all, you should know that SP2 is the first Vista/Windows 2008 certified edition (think UAC, think session zero hardening, think enhanced security). Secondly, SQL Server 2005 Express Edition SP2 is supported to run under WOW64. That is very comforting to know, and I hadn't expected a true 64-bit edition for free. So why does it complain about installing a 32-bit version on a 64-bit machine then?



    "The installation package has a missing file, or you are running a 32-bit only Setup program on a 64-bit computer"

    Of course, what you don't see is that SQL is first installing the SQL Native Client in the background (as a prerequisite) and the error message conveniently forgets to mention that this is in fact the installation that is not succeeding. The error message was indeed accurate, but the error was not that I was trying to run a 32-bit installer on a 64-bit machine, but that the 64-bit installer for the SQL Native Client is not included in the package! What’s even worse, some other essential x64 packages are also not included in the smallest SQL Express 2005 SP2 download.

  • So you have to include the missing files manually:

    1. Download the “SQL Server 2005 Express Edition SP2 with Advanced Services” package.

    2. Run both the SQL Express installers with the /X switch to extract the setup files (to different directories):

      sqlexpr.exe /x
      sqlexpr_adv.exe /x

    3. Next, locate the 64-bit SQL Native Client (sqlncli_x64.msi) and 64-bit SQL VSS Writer (SqlWriter_x64.msi) from the Advanced Services setup and copy them to the "Setup" directory of the regular SQL Express installation.
Et voila! The installer works now. One day, we will live in a perfect world of unambiguous error messages...

Now off to do some more SoftGri... ehr.. I mean Microsoft Application Vir... ehr... I mean App-V testing!

5 comments:

Anonymous said...

Great advice! Thanks! Adv package worked for me!

Anonymous said...

This is a great article. I have one question though. I have an app that I am upgrading to SQL Server 2008. I have used your techniques when we were using SQL Server 2005 Express, but I am not sure if this will work with 2008.

I noticed that there are two different files for installing on a 32-bit machine and a 64-bit machine, but, since these files are so large, they will not both fit on a cd. I would rather use your technique if it will work.

Thanks,
Reagan

DaZhooch said...

Hello!

I have 32-bit version of WinSrv2008.
Now i'm trying to install SQL 2005 Express ADV, but when it checking system it is saying about IIS features.
I have installed Application and Web servers' roles, but needed IIS feature is not installed.
Could You please help me with providing info about needed IIS feature?

thanks in advance
Zhooch

Anonymous said...

U solved my problem. Thanks!

Anonymous said...

Solved!!! Thank you very much for the solution