question

Lois-6388 avatar image
0 Votes"
Lois-6388 asked Criszhan-msft answered

An error when installing SQL 2017

Hi there,

It's the first time I post questions here seeking for resolution. Your help is really appreciated.

When I tried to install SQL 2017, there were some issues in relation to setup operation, as below:

Action required:
Use the following information to resolve the error, and then try the setup process again.

Feature failure reason:
An error occurred for a dependency of the feature causing the setup process for the feature to fail.

Error details:
§ Error installing SQL Server Database Engine Services Instance Features
Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
Error code: 1639
Log file: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20210508_141423\sql_engine_core_inst_Cpu64_1.log
Visithttps://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.1000.169&EvtType=sql_engine_core_inst.msi%400x162A16FE%400x1639 to get help on troubleshooting.

94856-failure-of-installing-sql-2017.png


sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErlandSommarskog avatar image
1 Vote"
ErlandSommarskog answered

Error code: 1639
Log file: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20210508_141423\sql_engine_core_inst_Cpu64_1.log

So did you look into this file? This file is very verbose, but there may be something that makes the penny drop.

I googled, and I found two blog posts about this error, although they do not match situation entirely. In this one:; https://www.mssqltips.com/sqlservertip/5315/fixing-sql-server-installation-error-1639/ seems to be for the same component, but it's for SQL 2008, so this is an issue that may have been fixed.

This post: https://blog.sqlauthority.com/2019/07/30/sql-server-2019-installation-failure-invalid-command-line-argument-consult-the-windows-installer-sdk-for-detailed-command-line-help/ is for SQL 2019, so it is more modern, but it relates to a different component.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Criszhan-msft avatar image
0 Votes"
Criszhan-msft answered

Hi,

Please check the Summary file. The location of the Summary file is the path shown at the bottom of the screenshot you showed.

One possible reason is that the previous SQL installation failed. Please try the following steps to clear the SQL Server installation remnants and reinstall SQL Server 2017. Please note that this operation cannot be performed if other instance of SQL Server is already installed and used on this computer. This operation will affect all SQL Server instances.

  1. Go to "Control Panel\Programs\Programs and Features" (Microsoft SQL Server 2017) to delete SQL Server and its components.

  2. Back up the registry.

  3. Delete the following items in regedit:
    --HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Microsoft SQL Server
    --HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSSQLServer

    Go to --HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall to delete all subkeys that reference SQL Server
    Go to --HKEY_LOCAL_MACHINE\ SYSTEM\CurrentControlSet\Services to delete all keys referencing SQL Server

  4. Delete all the SQL Server folders in the computer (the default is C:\Program Files\Microsoft SQL Server).

  5. Restart the computer. Then run the installer(setup.exe) as an administrator to install SQL Server 2017 again.

Also some posts related to the error 1639.
https://bobcares.com/blog/sql-server-error-1639/#:~:text=In%20short%2C%20the%20SQL%20server,Support%20Engineers%20fixes%20this%20error.

https://social.msdn.microsoft.com/Forums/en-US/57049cac-f14a-47a8-b3ee-0356943f26ea/sql-server-2014-installation-error-code-1639?forum=sqlsetupandupgrade

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.