Last few days were a bit hectic and I was unable to blog anything substantial. The whole web was ablaze with android exploits , android hacks , security issues of hand-held devices, as for me, I was looking into a SQL Express related installation issue and reverse engineering of web-server based hack attacks. After a few days will be blogging about these attacks but for the moment its SQL Express 2005.
At a first glance this seems to be a non-trival issue but this was one of those problems which consumed most of my weekend time.
SQL 2005 on a clean system doesn’t pose any problems but on a system which already has a SQL Native Client, the installation MAY go haywire. The reason is that ,not always does the installation fail when SQL native Client exists but only on rare occasions.
The error shown in the summary.log
Transcript of : %programfiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG\ summary.txt
Machine : X200 Product : SQL Native Client Error : An installation package for the product Microsoft SQL Server Native Client cannot be found. Try the installation again using a valid copy of the installation package 'sqlncli.msi'.
Machine : X200 Product : Microsoft SQL Server Native Client Product Version : 9.00.1399.06 Install : Failed Log File : D:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0006_X200_SQLNCLI_1. log Last Action : InstallFinalize Error String : An installation package for the product Microsoft SQL Server Native Client cannot be found. Try the installation again using a valid copy of the installation package 'sqlncli.msi'. Error Number : 1706
At the very first instance, any sane person would think that the SQLExpress Installer is corrupted and sqlncli.msi is missing from this installer, after this insanity and frustration creeps in.
According to Microsoft this is a bug of the installer and the only resolution offered is to uninstall SQL Native Client from Add Remove Programs. But the actually the problem resides in the manner in which SQL Installer installs SQL Native Client.
1: Sql Installer searches for SQL Native Client in the registry, if this entry is found then from the registry picks-up a file-system location for the uninstaller of the previously installed SQL native Client and then the normal installation proceeds.
If this file is missing from the filesystem or the key is not present then it throws up the above mentioned error.
Those who are into automation of SQLExpress installation will find this quite useful.
Synopsis for troubleshooting:
1: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\ UserData\S-1-5-18\Products\D64F86DB28A84664E8868FC755DBFE4D\InstallProperties
2: "LocalPackage"="%windows%\uninstall_file.msi"
Verify whether %windows%\uninstall_file.msi exists on the filesystem. If this file doesn’t exist then the SqlSetup will surely fail or if LocalPackage key does not exist then the installation will fail.
If the key does not exist in the registry or the file does not exist on the filesystem then start the SQLExpress 2005 installation after deleting the below mentioned keys.
1: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\ UserData\S-1-5-18\Products\D64F86DB28A84664E8868FC755DBFE4D
2: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ {BD68F46D-8A82-4664-8E68-F87C55BDEFD4}
3: HKEY_CLASSES_ROOT\Installer\Products\D64F86DB28A84664E8868FC755DBFE4D
4: HKEY_CLASSES_ROOT\Installer\Features\D64F86DB28A84664E8868FC755DBFE4D