Part – 2 : SQL Server 2005 Patch Fails to install with an error "Unable to install Windows Installer MSP file"

Part – 2 : SQL Server 2005 Patch Fails to install with an error "Unable to install Windows Installer MSP file"

  • Comments 2

Environment :

è  Windows Server 2003 SP2 x64

è  SQL Server 2005 Standard Edition SP2 x86 Build 9.00.3215  (SP2 with Cumulative Update 5)

 

Objective :

è  To install SP3 for SQL Server 2005.

 

Problem :

 

è  SP3 failed to install for all components of SQL Server 2005 . An error for Database Services in %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Summary.txt looks like below :

 

----------------------------------------------------------------------------------

Product                   : Database Services (MSSQLSERVER)

Product Version (Previous): 3215

Product Version (Final)   :

Status                    : Failure

Log File                  : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB955706_sqlrun_sql.msp.log

Error Number              : 1612

Error Description         : Unable to install Windows Installer MSP file

----------------------------------------------------------------------------------

 

 

è  Verbose log located at %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB955706_sqlrun_sql.msp.log looks like below :

 

=== Verbose logging started: 2/24/2009  22:11:26  Build type: SHIP UNICODE 3.01.4000.4042  Calling process: C:\SQLSP3\hotfix.exe ===

MSI (c) (AC:10) [22:11:26:689]: Resetting cached policy values

MSI (c) (AC:10) [22:11:26:689]: Machine policy value 'Debug' is 0

MSI (c) (AC:10) [22:11:26:689]: ******* RunEngine:

           ******* Product: {130A3BE1-85CC-4135-8EA7-5A724EE6CE2C}

           ******* Action:

           ******* CommandLine: **********

MSI (c) (AC:10) [22:11:26:689]: Client-side and UI is none or basic: Running entire install on the server.

MSI (c) (AC:10) [22:11:26:689]: Grabbed execution mutex.

MSI (c) (AC:10) [22:11:26:689]: Cloaking enabled.

MSI (c) (AC:10) [22:11:26:689]: Attempting to enable all disabled priveleges before calling Install on Server

MSI (c) (AC:10) [22:11:26:689]: Incrementing counter to disable shutdown. Counter after increment: 0

MSI (s) (A4:AC) [22:11:26:705]: Grabbed execution mutex.

MSI (s) (A4:24) [22:11:26:705]: Resetting cached policy values

MSI (s) (A4:24) [22:11:26:705]: Machine policy value 'Debug' is 0

MSI (s) (A4:24) [22:11:26:705]: ******* RunEngine:

           ******* Product: {130A3BE1-85CC-4135-8EA7-5A724EE6CE2C}

           ******* Action:

           ******* CommandLine: **********

MSI (s) (A4:24) [22:11:26:705]: Machine policy value 'DisableUserInstalls' is 0

MSI (s) (A4:24) [22:11:26:705]: Adding MSIINSTANCEGUID to command line.

MSI (s) (A4:24) [22:11:26:705]: End dialog not enabled

MSI (s) (A4:24) [22:11:26:705]: Original package ==> C:\WINDOWS\Installer\1e94391b.msi

MSI (s) (A4:24) [22:11:26:705]: Package we're running from ==> C:\WINDOWS\Installer\1e94391b.msi

MSI (s) (A4:24) [22:11:26:721]: APPCOMPAT: looking for appcompat database entry with ProductCode '{130A3BE1-85CC-4135-8EA7-5A724EE6CE2C}'.

MSI (s) (A4:24) [22:11:26:721]: APPCOMPAT: no matching ProductCode found in database.

:

:

:

MSI (s) (A4:24) [22:11:26:736]: Note: 1: 2262 2: _MsiPatchTransformView 3: -2147287038

MSI (s) (A4:24) [22:11:26:736]: Couldn't find local patch ''. Looking for it at its source.

MSI (s) (A4:24) [22:11:26:736]: Resolving Patch source.

MSI (s) (A4:24) [22:11:26:736]: User policy value 'SearchOrder' is 'nmu'

MSI (s) (A4:24) [22:11:26:736]: User policy value 'DisableMedia' is 0

MSI (s) (A4:24) [22:11:26:736]: Machine policy value 'AllowLockdownMedia' is 0

MSI (s) (A4:24) [22:11:26:736]: SOURCEMGMT: Media enabled only if package is safe.

MSI (s) (A4:24) [22:11:26:736]: SOURCEMGMT: Looking for sourcelist for product {4A35EF4A-D868-4B15-A84D-3E8925AA9558}

MSI (s) (A4:24) [22:11:26:736]: Note: 1: 1706 2: {4A35EF4A-D868-4B15-A84D-3E8925AA9558} 3: 

MSI (s) (A4:24) [22:11:26:736]: SOURCEMGMT: Failed to resolve source

MSI (s) (A4:24) [22:11:26:752]: Note: 1: 1708

MSI (s) (A4:24) [22:11:26:752]: Note: 1: 2729

MSI (s) (A4:24) [22:11:26:814]: Note: 1: 2729

MSI (s) (A4:24) [22:11:26:814]: Product: Microsoft SQL Server 2005 -- Installation failed.

 

MSI (s) (A4:24) [22:11:26:814]: MainEngineThread is returning 1612

The installation source for this product is not available.  Verify that the source exists and that you can access it.

C:\WINDOWS\Installer\1e94391b.msi

MSI (c) (AC:10) [22:11:26:814]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1

MSI (c) (AC:10) [22:11:26:830]: MainEngineThread is returning 1612

=== Verbose logging stopped: 2/24/2009  22:11:26 ===

 

 

Explanation :


1.       In this blog, I explain to troubleshoot patch installation failure for Database Services (specifically) if we get the specific error as shown above .

2.       In the log above , we see that Installer first looked for cached msi , found and continued (Package we're running from ==> C:\WINDOWS\Installer\1e94391b.msi).

3.     Next , we see an error Couldn't find local patch ''. Looking for it at its source. This error indicates the absence of the patch key in the registry at either or all of the locations below :

 

i.        HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches

ii.       HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Patches

 

4.     To troubleshoot, we see the product GUID Product: {130A3BE1-85CC-4135-8EA7-5A724EE6CE2C} . Using the search hints mentioned in previous blog, the product information was found to be located under following registry key:

 

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

 

The following key value confirms that this is the GUID for Database Services :

 

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

DisplayName = Microsoft SQL Server 2005             à Database Services

 

5.     Under following key , I find the information about what all patches are installed on this component (Database Services) :

 

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

 

..\Patches\D78318612BD2C424785C607661F6E39C

DisplayName = Service Pack 1 for SQL Server Database Services 2005 ENU (KB913090)          à SP1

 

..\Patches\A3B085EA74A9A7640A496636F7EF9A44

DisplayName = GDR 2050 for SQL Server Database Services 2005 ENU (KB932555)               à GDR2050

 

..\Patches\A4FE53A4868D51B48AD4E39852AA5985

DisplayName = Service Pack 2 for SQL Server Database Services 2005 ENU (KB921896)          à SP2

 

..\Patches\E9420297EEB7BD144BCCAEF18A3797AB

DisplayName = Hotfix 3215 for SQL Server Database Services 2005 ENU (KB943656)          à CU5

 

 

We see that total four patches have been applied on Database Engine so far . The patches are : SP1 + GDR 2050 + SP2 + CU5

 

6.       Objective is to apply SP3 . When we try to apply any patch (e.g: hotfix/CU/Service Pack) ,the installer usually looks for the information about previously applied patches but not all. Installer would look for the information about all those patches which have been applied since last Service Pack , including service pack info.  In this case, we had to apply SP3 , so installer would look for laste Service Pack i.e. SP2 plus CU5 info under following registry hives :

 

a.       HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches

b.       HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Patches

 

7.       Therefore, I searched for these two keys (SP2 and CU5) at the above mentioned two hives to see whether they exist or not, obviously they didn’t exist and so we get the error Couldn't find local patch ''. Looking for it at its source.

 

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches\A4FE53A4868D51B48AD4E39852AA5985      à Absent

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Patches\A4FE53A4868D51B48AD4E39852AA5985 à Absent

 

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches\E9420297EEB7BD144BCCAEF18A3797AB      à Absent

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Patches\E9420297EEB7BD144BCCAEF18A3797AB à Absent

 

Let’s have a quick look to see what these two keys contain , e.g. :

 

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

LocalPackage = C:\WINDOWS\Installer\1ece9c95.msp  à This is the cached msp file name

 

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches

|-- SourceList à Conatins the “LastUsedSource” and “PackageName”

            |-- Media

            |-- Net

 

8.       To resolve this , I have two methods :

 

I.        Create the missing keys and sub-keys under ..\ Classes\Installer\Patches and put the data appropriately. I prefer this method because the installation does not only succeed but re-creates the missing key at ..\ UserData\S-1-5-18\Patches , caches the msp file and populates this key with the cached msp file info. This ensures success of any future patch installation.

 

II.       Create the missing keys under ..\ UserData\S-1-5-18\Patches , put the appropriate msp file with any random filename under %windir%\Installer and provide the same filename as a data in “LocalPackage” key value. This works because Installer first looks at ..\ UserData\S-1-5-18\Patches to use the cached msp file . However , this method doesn’t re-create the missing keys at ..\ Classes\Installer\Patches , so it may cause an issue in future with installation of other patches.

 

I prefer Method - I to resolve the issue.

 

 

Resolution : Method - I

1.       Extracted SP2 and CU5 for SP2 under C:\SQLSP2 and C:\SQLCU5 folders respectively. To extract , the switch /extract or /x can be used on a command prompt along with exe filename which has to be extracted.

 

2.       Took a full registry backup . Prepared a script with appropriate data , saved the script below in a .reg filename extension , right-click the file and merged to re-create these keys in the Registry.

 

Windows Registry Editor Version 5.00

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches\A4FE53A4868D51B48AD4E39852AA5985]

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches\A4FE53A4868D51B48AD4E39852AA5985\SourceList]

"PackageName"="sqlrun_sql.msp"

"LastUsedSource"="n;1;C:\\SQLSP2\\hotfixsql\\files\\"

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches\A4FE53A4868D51B48AD4E39852AA5985\SourceList\Media]

"DiskPrompt"="Please insert next disk"

"100"="SQL200532SP2;"

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches\A4FE53A4868D51B48AD4E39852AA5985\SourceList\Net]

"1"="C:\\SQLSP2\\hotfixsql\\files\\"

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches\E9420297EEB7BD144BCCAEF18A3797AB]

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches\E9420297EEB7BD144BCCAEF18A3797AB\SourceList]

"PackageName"="sqlrun_sql.msp"

"LastUsedSource"="n;1;C:\\SQLCU5\\hotfixsql\\files\\"

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches\E9420297EEB7BD144BCCAEF18A3797AB\SourceList\Media]

"DiskPrompt"="Please insert next disk"

"101"="SQL200532Hotfix;"

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Patches\E9420297EEB7BD144BCCAEF18A3797AB\SourceList\Net]

"1"="C:\\SQLCU5\\hotfixsql\\files\\"

 

3.       Started SP3 installation , chose Database Services. Installation successful. It re-cached missing msp file, after re-creating the missing keys, populated this info  under ..\UserData\S-1-5-18\Patches .

4.       The same method was been followed for other components e.g. DTS,RS,NS,AS and Tools.

5.       Please not that the reg values (e.g: 100, 101 ) above , they are different for Hotfix or SP. Also , PackageName has different value depending upon the component , e.g. For Workstation components PackagName would be sqlrun_tools.msp . It is strongly advisable to put the appropriate data in appropriate key while building registry keys. They depend on your environment.



Resolution : Method - II

 

1.       Extract SP2 and CU5 for SP2 under any folder , let’s say C:\SQLSP2 and C:\SQLCU5 folders respectively. To extract , the switch /extract or /x can be used on a command prompt along with exe filename which has to be extracted.

2.       Take a full registry backup . Copy the script below , save in a .reg filename extension , right-click the file and merged to re-create these keys in the Registry.

 

Windows Registry Editor Version 5.00

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Patches\A4FE53A4868D51B48AD4E39852AA5985]

"LocalPackage"="C:\\WINDOWS\\Installer\\1f13a7c3.msp"                  

à 1f13a7c3.msp is an arbitrary filename I chose.

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Patches\E9420297EEB7BD144BCCAEF18A3797AB]

"LocalPackage"="C:\\WINDOWS\\Installer\\1f13a7c2.msp"                

à 1f13a7c2.msp is an arbitrary filename I chose.

 

3.       Now, copy and paste as per the following:

          a.       Copy C:\SQLSP2\hotfixsql\files\sqlrun_sql.msp, paste in C:\Windows\Installer and rename it to the arbitrary filename specified i.e. 1f13a7c3.msp

          b.       Copy C:\SQLCU5\hotfixsql\files\sqlrun_sql.msp, paste in C:\Windows\Installer and rename it to the arbitrary filename specified i.e. 1f13a7c2.msp

4.       Start SP3 installation, installer would now find the msp file at cached location and would succeed. However as stated earlier, this method doesn’t re-create the missing keys at ..\ Classes\Installer\Patches, so it may cause an issue in future with installation of other patches.

5.       Again, It is strongly advisable to put the appropriate data in appropriate key while building registry keys. They depend on your environment.

 

I would prefer method-II because of the advantage mentioned, method-I is easier though.

 

 

DISCLAIMER: Resolutions shown above are based on the example error . Please go through the explanation section to have the concept . This way you can follow resolution steps with the data/keys specific to your environment.

 

Helpful Links :

·         How to add, modify, or delete registry subkeys and values by using a registration entries (.reg) file

http://support.microsoft.com/kb/310516

 

·         Part – 1 : SQL Server 2005 Patch Fails to install with an error "Unable to install Windows Installer MSP file"

http://blogs.msdn.com/sqlserverfaq/archive/2009/01/30/part-1-sql-server-2005-patch-fails-to-install-with-an-error-unable-to-install-windows-installer-msp-file.aspx

 

Prashant Kumar,
SE, Microsoft SQL Server

Leave a Comment
  • Please add 8 and 1 and type the answer here:
  • Post
Page 1 of 1 (2 items)