SQL Server 2008 Setup fails to Install with Error 1402

SQL Server 2008 Setup fails to Install with Error 1402

  • Comments 9

SQL Server 2008 setup may fail with the following error even though you are running the setup as administrator. You might get these kind of errors in Detail.txt after you cleaned up an failed setup (from Add/Remove Programs) and try to run the setup again.

Error 1402. Could not open key: UNKNOWN\Components\493032C95B52CBD448DD2B5A52C50E9A\3EC761FD7E06AE4499CE52705CF173EA. 

System error 5.  Verify that you have sufficient access to that key, or contact your support personnel.

Action ended 20:37:24: InstallFinalize. Return value 3.

Note: The above GUID may be different in each case

When you search for the GUID that you see in the error in Registry, it maps to the following key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\<GUID>

Though you might be running the setup as Administrator you may not be able to access the registry key and it sub keys

Even trying to delete the registry key might fail with the access denied errors

In our case the GUID in the error was pointing to MSXML which was already removed from Add/Remove Programs

There are multiple ways to approach this:

Workaround 1

·         Download and install psexec utility from the following link

http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

·         Open a command prompt (on Vista/Windows 7/2008) using 'run as administrator'  option, for Windows (2000 /XP/2003) Hold down the shift key and right click on command prompt and choose run as.

·         In the command prompt Navigate to the folder where PSEXEC is installed.

·         Execute the following from the command prompt.

§  psexec -i -s cmd.exe

·         This will invoke another command prompt running under ‘Local System’

·         Using this command prompt open Registry Editor

Command prompt> regedit

·         In registry editor navigate to the following hive

HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\

·         Add the user account used to run the installation under permissions for the above hive and grant ‘Full control’ for that user.

o    Click on Advanced

clip_image002

o    Under the Advanced security settings for Components choose the user and check the “Replace all existing inheritable permissions…………” check box as shown below and click OK

  clip_image002[5]

·         Re-run the installation.

Workaround 2

As a workaround for the problem you can run the following command at the command prompt to reset the permissions in registry rather than rebuilding the box

SECEDIT /CONFIGURE /CFG %WINDIR%\INF\DEFLTBASE.INF /DB DEFLTBASE.SDB /VERBOSE /AREAS REGKEYS

Disclaimer: The above command would revert all security settings to the default and thus may be used as a workaround to avoid rebuilding the server.

Workaround 3

Another possible solution is for the ‘Administrator’ account to take ownership of HKEY_LOCAL_MACHINE registry hive. Owner can be found under Permissions->Advanced

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.

Rajesh Setlem , Aravind Lakshminarayanan
SE, Microsoft SQL Server.

Reviewed by
Shamik Ghosh & Sudarshan Narasimhan
Technical Lead, Microsoft SQL Server.

Leave a Comment
  • Please add 5 and 7 and type the answer here:
  • Post
  • Thank you! I used Workaround 1 on SQL Server 2005. SQL Setup kept detecting SQL Tools even though they weren't there. After installing SP3 I wasn't able to remove them ("your upgrade is blocked") so I used the Windows Installer Cleanup Utility to remove them before attempting to re-install. Then this 1402 started happening and the specific key would change each time. This solved the problem and allowed the install to continue.

  • Hi,

    its very helpful for me. thanks for sharing this information. i faced this error many time. i fixed this issue after reading this post. i also got some help from this article ezinearticles.com

  • The workaround2 worked for me when i encountered this issue while installing windows2008r2 on windows7 enterprise.

    Simply type cmd.exe and right click - run as administrator.

    C:\Windows\system32>SECEDIT /CONFIGURE /CFG %WINDIR%\INF\DEFLTBASE.INF /DB DEFLT

    BASE.SDB /VERBOSE /AREAS REGKEYS

    The task has completed. Warnings occurred for some attributes during this operat

    ion. It's okay to ignore the warning.

    See log %windir%\security\logs\scesrv.log for detail info.

    C:\Windows\system32>

    Voila! Your problem is fixed and you can run your sql setup now.

  • Thank you! My rest of the day also wishes to thank you and the previous half wishes we had found this advice earlier ;)

  • Gracias por el POST

    ha funcionado perfectamente, aunque era para la instalacion de otro producto, tenía que ver con el error.

  • thanks

  • awesome....this bullshit costs me nearly 12 hours.

    btw. on my server 2008 r2 the .net 3.5 SP1 install didn't work, even with 4.5.1 not installed. sql server 2008 sp3 via wu always crashed on installation ^^. in a second try of this howto i uninstalled .net 4.5.1 and all sql server stuff, did the registry permissions and it worked. have had sql server express 2008 r2 installed and tried to install the full sql server 2008 (no r2!) over it. so i won't have to reinstall the whole server tomorrow, on a sunday. sql server 2008 sp3 seems to be installing fine via wu now.

    thanks synthor :) :) :)

  • Perfect solution.

    #1 has worked for SQL Server 2008 R2 Express

  • I would like to send you my personal thanks and appreciation for sharing this great information!

    I was trying to install HP Web Jetadmin 10.3 SR6 (64 bit) to my Windows 7 PC.

    SQL Server 2008 component is also included to HP Webjetadmin installation media.

    But SQL Server component was never installed to my PC. :(

    What i finally did was that i:

    first uninstall whole HP Web Jetadmin bug(?) software away.

    Then i Restart Windows.

    Then i try your blog Workaround 2 (---> Windows cmd  - command prompt) and i type:

    SECEDIT /CONFIGURE /CFG %WINDIR%\INF\DEFLTBASE.INF /DB DEFLTBASE.SDB /VERBOSE /AREAS REGKEYS

    After that trick i reinstalled HP_Web_Jetadmin_10.3_64 bit and finally also

    SQL Server 2008 component was installed along too.

    Many thanks!! :)

Page 1 of 1 (9 items)