Recently I had some issues with SQL server 2008 R2 service pack 1 installation. 

From first perspective it looks like an issue with corrupted installation package, but true issue was somewhere else.  It was a windows installer.

You know those days, when the client asked you for a simple task such an installation for new SQL server instance. You know that there will be some steps in this process. First we start with a standard installation of RTM server version and then we go for Service Packs. 
This simple and relatively fast process can overthrow into several hours of investigation and your hopes for fast lunch time are fading outSmile.  To help you save your time, I have prepared this technical review of my fix for those issues:

Message 1:
Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Errors.resources" was correctly embedded or linked into assembly "Microsoft.SqlServer.Discovery" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Message 2:
The cached patch file "C:\Windows\Installer\13215cad.msp" is missing. The original file for this cached file is "sql_as.msp", which can be installed from "Service Pack 1 for SQL Server 2008 R2 (KB2528583) (64-bit)", version 10.51.2500.0.

Message 3:
C:\Windows\Installer\349ed5a.msp
Exception type: System.IO.FileNotFoundException

Cause:

First of all we need to talk about reason for those error messages. In my case it was simple. Those msi/msp packages were missing in windows installer cache (C:\Windows\Installer\). Sometimes “proactive admins” wants to cleanup system drive and accidentally drop installer packages. So never delete installer packages from the system storage.
Another point to comment is that my system had three instances already installed and patched. One express, two Enterprise and I have already installed Standard version which need to be patched.
Issue can arise also if you have different versions of installed instances and some patches require having windows installer packages stored in his repository (also applied for features that you have not installed in the patched instance e.g. full text, replication, analysis services, etc…). 

Behavior:


When I installed RTM version of SQL server standard everything looks ok. System was running, installation finished successfully. But when I download and run SP1 installation, system reported error (message 3). So it seems that my package was corrupted while downloading. So I have used the Service pack which has been successfully used previously to patch enterprise instances. It report same issue.

Solution:
You can find lots of advises to repair your installation from installation media and then run SP again. In my case it isn’t work. To be exact, I have got another error (message 3 but for different .msi file) in repair process on instance which I have installed few minutes ago. So I have asked what is wrong?

You need to start investigating all those error messages.

Best place to start are installation logs:

Path: c:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\*date*_*time*\

Files: 
Summary_*Machine*_*date*_*time*.txt
Detail.txt – provides full error description and installation sequence. There you can find package name which are failing. In my case it was KB2528583_sql_fulltext_Cpu64 for service pack and sql_as_Cpu64 for instance repair.

If you will get an error with just installer file (like message 3) and you want to be sure with the failing package name, you can use a server registry to confirm correlation between package name(sql_as_Cpu64) and windows installer file (example: 349ed5a.msp).

Go to the log and look at the end of the row above first error message. You will find something like this:
PatchFileName=sql_fulltext.msi PatchCode={2E7EB973-48D5-43CA-9360-CA011FAE81EE}

Patch file name can be verified by searching described PatchCode in the registry key bellow.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products

From the entries found in that key I can confirm the package purpose.
DisplayName: SQL Server 2008 R2 SP1 Full text search

So then I need to extract my service pack to folder and look for the msp file for fulltext search. 
My file was: 
SQLServer2008R2SP1-KB2528583-x64-ENU\x64\setup\sql_fulltext.msi

Copy file to the installer repository (C:\Windows\Installer\) and name it per installer request from error message (349ed5a.msp)
Restart the installation process of service pack/instance repair.

Remarks: 
You can meet with the requests for msp or msi files. Msp are from service packs and msi are mainly from installation media of SQL server. You can find them in folder \x64\Setup\ on your install media.

I had also error like message 1. In that case I have used wrong msi file from server installation media. I have assumed server repair (for standard instance) will want msi file from SQL standard installation media, but I was wrong he wanted it from enterprise edition installation media. Because it was analysis services which have been installed previously with one of the enterprise instance editions and SP installation always check all installed instance packages.

More tips and tricks

SQL 2012 allow only 20 cores
by Michal Tinthofer on 01/10/2012

Anyway this post should focus on some different distressing news about SQL 2012.  If you have current software assurance (SA) for SQL Server 2008 R2, this allows you to slide into SQL Server 2012 while maintaining CAL licensing (by the way this is not pos

Read more
SMT 00.5.40 Released!
by Michal Tinthofer on 21/12/2017

In this Christmas time we have some presents for you in form of new release. New reports and tuning notepad awaits you!.

Read more
LATCH_EX Waits
by Michal Kovaľ on 27/04/2022

Recently we had a request to optimize LATCH_EX waits on one of the production servers for our customer. Today I would like to share with you our apporach and how we handled the situation.

Read more