SQL SERVER 2005 INSTANCE FAILING TO INSTALL AFTER TRYING TO REINSTALL WITH ERROR 1603

Many times we need to reinstall a sql server instance due to number of reason.

Whenever you reinstall the sql server instance the success of the installation of the new sql server instance primarily depends on the whether the previous uninstall of the sql server was clean so that all the registry keys and the related folders are deleted.

If the un-installation is done primarily from GUI and if it is successful we can say that the uninstall was clean, however if you go for manual un-installation you need to ensure that all the related registry keys and folders are deleted. We can refer to the following KB article to manually cleanup the sql server instance

https://support.microsoft.com/kb/909967

However if the previous un-installation was not clean, when trying to reinstall the sql server instance the installation may fail with error 1603.

As we have mentioned in our previous post whenever an setup installation fails we need to first check the Summary.txt to check for the Error Message which caused the failure.

--------------------------------------------------------------------------------
Machine : NODE01
Product : Microsoft SQL Server 2005
Product Version : 9.00.1399.06
Install : Failed
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup001_NODE01_SQL.log
Error Number : 1603

--------------------------------------------------------------------------------
Machine : NODE02
Product : Microsoft SQL Server 2005
Product Version : 9.00.1399.06
Install : Failed
Log File : \\NODE01\C$\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup001_NODE02_SQL.log
Error Number : 1602
--------------------------------------------------------------------------------

We checked the SQLSetup001_NODE01_SQL.log which is mentioned above and looked for “Return Value 3” and reached the following part of the log which leads us to the root cause of the error

SQLSetup001_NODE01_SQL.log

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

MSI (s) (34:E4) [02:35:53:642]: Doing action: CAResolveInstanceName.68C6D15C_77E0_11D5_8528_00C04F68155C
Action ended 02:35:53: SQLLicensing.D20239D7_E87C_40C9_9837_E70B8D4882C2. Return value 1.
MSI (s) (34:A0) [02:35:53:642]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI32F.tmp, Entrypoint: ResolveInstanceName
Action start 02:35:53: CAResolveInstanceName.68C6D15C_77E0_11D5_8528_00C04F68155C.
FTECa.DLL: INFO: FTE: ResolveInstanceName(), Entering...
FTECa.DLL: INFO: FTE: This is NOT an Exchange Server install...
FTECa.DLL: INFO: ResolveInstanceName: FTEInstName obtained: TMSDERIV_PROD
FTECa.DLL: INFO: ResolveInstanceName: FTERudeInstName obtained: MSSQL.8
FTECa.DLL: INFO: LookupInstanceId: Iterating the key: 1
FTECa.DLL: INFO: LookupInstanceId: Iterating rude name: MSSQL.1
FTECa.DLL: INFO: LookupInstanceId: Iterating the key: 2
FTECa.DLL: INFO: LookupInstanceId: Iterating rude name: MSSQL.2
FTECa.DLL: INFO: LookupInstanceId: Iterating the key: 3
FTECa.DLL: INFO: LookupInstanceId: Iterating rude name: MSSQL.4
FTECa.DLL: INFO: LookupInstanceId: Iterating the key: 4
FTECa.DLL: INFO: LookupInstanceId: Iterating rude name: MSSQL.6
FTECa.DLL: INFO: LookupInstanceId: Iterating the key: 5
FTECa.DLL: ERROR: LookupInstanceId: RegQueryValueEx(RudeName) failed. Err = 2
Action ended 02:35:53: CAResolveInstanceName.68C6D15C_77E0_11D5_8528_00C04F68155C. Return value 3.
Action ended 02:35:53: INSTALL. Return value 3.

From the above error we see that setup is unable to resolve the GUID 68C6D15C_77E0_11D5_8528_00C04F68155C into the sql server instance name and hence the setup was failing with error 1603.

Setup was looking at the registry location HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSFTESQLInstMap to resolve the GUID to the Instance Name.

We checked the registry location HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSFTESQLInstMap and found there was wrong mapping for GUID 68C6D15C_77E0_11D5_8528_00C04F68155C.

IMPORTANT : This resolution contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

Resolution
========

So to resolve the issue we renamed the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSFTESQLInstMap  to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSFTESQLInstMap.old  and started the installation and the install ran fine without any errors.

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.

Santosh Kumar Goli,
SE, Microsoft SQL Server