Wednesday, 29 April 2009

Windows installer cache

I was having fun the other day installing SQL service packs and I found this little fix that I'd like to share it with you all.

When you are missing file like the MSI or MSP from the windows installer cache you can have some problem with patching or even removing SQL 2005
Symptoms SQL 2005 service pack install fails/ SQL 2005 uninstall fails

Example we’ll pretend I have a SQL 2005 server with SP1 install and I’m going to install SP2… (Sounds simple enough right?) During the install some of the components fail in this example I’ll say it’s my SSIS but it could be any other component as well, Database engine, Notification Services etc.

So after it’s failed I open the hot fix log folder to see what happened in this case
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\DTS9_Hotfix_KB921896_sqlrun_dts.msp

Now I start looking for errors first one of note is a line
MSI (s) (B8:1C) [13:28:24:254]: Original package ==> C:\WINDOWS\Installer\e893c17.msi

Check the c:\windows\installer folder to see if this file exists if it doesn’t find the sqlrun_dts.msi from the install CD and copy it to the windows installer folder and then rename it as the log name shows, this unique name is created at install time so the name will be different on each server, sometimes on the same server it can be different between instances as well.

When you are missing this file you will not be able to install or uninstall the Microsoft SQL 2005 equally you will need the MSP (Microsoft Patch) file as well, if its missing again your find the MSP file in the log

MSI (s) (B8:1C) [13:28:24:286]: Opening existing patch 'C:\WINDOWS\Installer\e893c8b.msp
Check it exist in the windows installer folder without it the install will fail.

If you are missing the MSP because I had SP1 before I need to get the MSP file from SP1 so in this case I need to run the service pack 1 with the /X switch to extract the files and once this is done copy the sqlrun_dts.msp from it to the windows installer directory and rename it as the name shows in the log, again this is unique to each server.

Now I’ve corrected all the missing files I run the service pack 2 again… and I have a successful install with no errors.
These steps also apply to all other SQL 2005 components and SharePoint services as well along with Microsoft office.

No comments: