Freigeben über


The "Instance to upgrade" option does not appear when we upgrade the SQL server from 2005 to 2008

Problem Description in our scenario:

====================================

The Instance which we needed to upgrade did not appear in the " Instance to upgrade” drop down box while doing an upgrade from the SQL server 2005 to 2008.

Cause of the issue in our scenario:

==========================

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-x-x-xx\Products\xxxx1F970CF830D459D49F7EC1xxxxxx\InstallProperties

Display name: Microsoft SQL Server 2005 (64-bit)

LocalPackage: C:\WINDOWS\Installer\b232065.msi

In the above Registry location the Registry key "LocalPackage" was pointed to an MSI file "C:\WINDOWS\Installer\b232065.msi" which was not present in the C:\WINDOWS\Installer folder

Example:

{

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

Display name: Microsoft SQL Server 2005 (64-bit)

LocalPackage: C:\WINDOWS\Installer\b232065.msi

}

If the msi file pointed out in the Registry key "LocalPackage" is missing then the " Instance to upgrade " option does not appear.

Workaround in our scenario:

======================

We copied the SQLRun_SQL.msi from SQL2005 setup to C:\WINDOWS\Installer and renamed it to MSI file name as mentioned in above registry (In this case b232065.msi)after this we were able to see the option "Instance to upgrade".

Note: The MSI file has to be copied over from the same architecture (x64/x86) source that it was originally installed from.

After you copy the SQLRun_SQL.msi from SQL2005 setup to C:\WINDOWS\Installer and rename it to MSI file name mentioned in the above registry.

We will get the "Instance to upgrade" option during upgrade, but during the upgrade phase we might get a message box with error’s similar to the one below.

{

2009-05-06 10:18:20 Slp:
2009-05-06 10:18:20 Slp: Exception type: Microsoft.SqlServer.Configuration.MsiExtension.MsiExtensionException
2009-05-06 10:18:20 Slp: Message:
2009-05-06 10:18:20 Slp: SQL Server Setup has encountered an error when running a Windows Installer file.
2009-05-06 10:18:20 Slp:
2009-05-06 10:18:20 Slp: Windows Installer error message: This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
2009-05-06 10:18:20 Slp:
2009-05-06 10:18:20 Slp: Windows Installer file: {79F1B65E-8FC0-4D03-954D-F9E71C85AEC7}
2009-05-06 10:18:20 Slp: Windows Installer log file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20090506_100506\Sql2005_Cpu64_1.log
2009-05-06 10:18:20 Slp: Data:
2009-05-06 10:18:20 Slp: DisableRetry = true
2009-05-06 10:18:20 Slp: Inner exception type: System.ComponentModel.Win32Exception
2009-05-06 10:18:20 Slp: Message:
2009-05-06 10:18:20 Slp: This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
2009-05-06 10:18:20 Slp:
2009-05-06 10:18:20 Slp: ----------------------------------------
2009-05-06 10:24:31 Slp: User has chosen to retry this action
2009-05-06 10:24:31 Slp: MSI log file for the next attempt: 'C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20090506_100506\Sql2005_Cpu64_1_1.log'
2009-05-06 10:24:31 Slp: Retry No.1

}

If you face any errors mentioned above please follow the steps mentioned in below blog and click retry in the message box and installation will proceed.

https://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?CommentPosted=true

Note: This post should not be treated as the Microsoft’s Recommendation or Resolution to the problem, it is only a workaround which worked in our environment and so we would like to share it.

Microsoft recommends that you DO NOT delete/move/modify any MSI or MSP files from the Windows Installer Cache (C:\Windows\Installer or C:\WINNT\Installer). These are files that will be used for later patching, upgrade or un-installation. Removing these files may cause upgrades or patching or uninstall to fail. If you are using any third-party disk cleanup utilities please take care to exclude the above location from the cleanup process.

Ravi Kiran Reddy Gade
SE, Microsoft Sql Server

Reviewed by

Karthick Krishnamurthy
Technical Lead, Microsoft Sql server

&

Sudarshan Narasimhan
Technical lead, Microsoft Sql Server.