SQL server error 1639 occurs at the time of the SQL Server installation. It happens due to a number of reasons ranging from issues with folder name to SQL port.
As a part of our Server Management Services, we help our Customers to fix SQL related errors regularly.
Let us today discuss the possible causes and fixes for this error.
What causes the SQL error 1639?
Installation of SQL Server on windows machine fails due to a number of reasons. Some of them to list out are:
- The name of the installation directory has space in it.
- Remnants of the previous installation that leave orphaned entries in the windows installer registry.
- Another service running in the SQL port.
- The issue with the Windows temp folder.
As a result, the installation fails and users face the message that the SQL installation completed with failures. You can get the details of the exact error message from the Summary logs. The error message would look like:
Let us now look at the possible fixes for this error.
How to fix the SQL error 1639?
As we discussed earlier a major reason for this error is unwanted characters in the installation folder name. For instance space between the words in the folder name is not permitted. Therefore, if the installation folder name is SQL Server 2008, it is a good idea to change it to SQLServer2008 or SQL_Server_2008.
Next, we can remove the failed installation from the server using “Add and Remove Programs”. Finally, we can start the installation again by a right-click on the setup file and choosing “Run as administrator” option.
Unnregister and re-register Windows installer
Another reason for this error could be an issue with the Windows installer. We could solve this by an unregister and re-register of the Windows installer.
a) Click Start and the Run.
b) In the Run box type msiexec /unreg and then ENTER.
c) Click Start and the Run.
d) In the Run box type msiexec /regserver and then ENTER.
Stop the service running on the SQL port
By default, the typical ports used by SQL Server and associated database engine services are: TCP 1433, 4022, 135, 1434. If any other service is running in this port, it may cause a failure for the SQL installation. Thus we may need to stop the service running in that port. To find the service running in the port,
1.Open command prompt as administrator.
2.Use the command netstat -a -n -o and it shows the result in the order "protocol, local IP:local port, foreign IP:foreign port, port state, and pid".
3.View the local port and pid from the result in step 2.
4.Open task manager and navigate to details tab.
5.Search for the pid obtained in step 3 in the details tab to get the details of the service.
Now that we have the service name, we could either stop that service or change the port number of the service to complete the SQL installation
[Need help to fix SQL errors? We are available 24×7.]
Conclusion
In short, the SQL server error 1639 occurs at the time of the SQL Server installation. The major reasons for this error include extra spaces in the installation file name, another service using SQL port, etc. Today we saw how our Support Engineers fixes this error.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
GET STARTED
var google_conversion_label = «owonCMyG5nEQ0aD71QM»;
Hi All,
Today I was installing microsoft SQL developer/express on my laptop. However the installation ends in a
1639 error.
Unable to install SQL Server (setup.exe). Exit code (Decimal): -2068052377Error description: Invalid command line argument. Consult the windows Installer SDK for detailed command line help.
How can I fix this error?
These are parts of the log files:
Log file 1
Configuration file:
C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20180823_181447\ConfigurationFile.ini
Detailed results:
Feature:
Database Engine Services
Status:
Failed
Reason for failure:
An error occurred during the setup process of the feature.
Next Step:
Use the following information to resolve the error, and then try the setup process again.
Component name:
SQL Server Database Engine Services Instance Features
Component error code:
1639
Component log file:
C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20180823_181447\sql_engine_core_inst_Cpu64_1.log
Error description: Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
Error help link:
https://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%400×1639
Log file 2
MSI (s) (4C:0C) [18:15:28:084]: Machine policy value ‘TransformsSecure’ is 0
MSI (s) (4C:0C) [18:15:28:085]: User policy value ‘TransformsAtSource’ is 0
MSI (s) (4C:0C) [18:15:28:086]: Machine policy value ‘DisableUserInstalls’ is 0
MSI (s) (4C:0C) [18:15:28:086]: Specified instance {36C9ADEE-91B0-4FFA-9CBA-9164CE6089D5} via transform :InstID02.mst;:InstName02.mst is already installed. MSINEWINSTANCE requires a new instance
that is not installed.
MSI (s) (4C:0C) [18:15:28:087]: MainEngineThread is returning 1639
MSI (s) (4C:94) [18:15:28:088]: User policy value ‘DisableRollback’ is 0
MSI (s) (4C:94) [18:15:28:088]: Machine policy value ‘DisableRollback’ is 0
MSI (s) (4C:94) [18:15:28:088]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (4C:94) [18:15:28:088]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (4C:94) [18:15:28:089]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (4C:94) [18:15:28:089]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.
Counter after decrement: -1
MSI (c) (18:C0) [18:15:28:091]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.
Counter after decrement: -1
MSI (c) (18:C0) [18:15:28:091]: MainEngineThread is returning 1639
=== Verbose logging stopped: 23/08/2018
18:15:28 ===
Thanks very much.
Regards,
Giovanni
- Remove From My Forums
Installation problem with SQL Server 2017 (Error 1639) — help me a save baby pandas!
-
Question
-
Hello,
I recently uninstalled SQL Server and now I’m trying to install it again (SQL Server 2017 Developer Edition, Basic installation)..
The problem is, every time I do it, in the end of the installation I get a page saying «Oops, unable to install SQL Server».
I’ve tried to delete all sql folders and registry keys, uninstall virtually everything related to SQL Server, installing as admin, cleaning and fixing the registry, reboots, and so on… Nothing seems to be working!
Right now, the installation log states:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2068052377
Start time: 2019-04-07 16:57:21
End time: 2019-04-07 16:58:02
Requested action: InstallSetup completed with required actions for features.
Troubleshooting information for those features:
Next step for SQLEngine: Use the following information to resolve the error, and then try the setup process again.Detailed results:
Feature: Database Engine Services
Status: Failed
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, and then
try the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 1639
Component log file: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20190407_165720\sql_engine_core_inst_Cpu64_1.log
Error description: Invalid
Command Line Argument. See the Windows Installer SDK for detailed help from the command line.
Error help link: https://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%400×1639Feature: SQL Browser
Status: PassedFeature: SQL Writer
Status: PassedFeature: SQL Client Connectivity
Status: PassedFeature: SQL Client Connectivity SDK
Status: PassedI’m getting desperate since I’m really running out of time for this project…
Thanks in advance!
SQL Server Error: 1639
Severity: 16
Event Logged or not: No
Description:
The eror occurs during installation of SQL Server
Severity 16 Description:
Indicates general errors that can be corrected by the user.
SQL Server error 1639 happens during the installation of SQL Server. It happens for a variety of causes, ranging from folder naming issues to SQL port issues.
We assist our customers with SQL related faults on a regular basis as part of our Server Management Services.
Let’s talk about the probable causes and solutions for this mistake today.
SQL Server installation on a Windows PC fails for a variety of reasons. To name a few, there are:
The installation directory’s name contains a space.
Orphaned entries in the Windows installer registry due to leftovers from a prior installation.
In the SQL port, another service is operating.
The problem with the transient folder in Windows.
As a result, the installation fails, and users see an error message stating that the SQL installation failed. The details of the precise error message can be seen in the Summary logs.
Reading sql server error log location from SQL Query
Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.
USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go
For other ways to read and find error log location please our artcile https://sqlserver-dba.co.uk/error-log/sql-server-identify-location-of-the-sql-server-error-log-file.html
Solution for Resolving the Error
What is the solution to SQL error 1639?
As previously stated, unnecessary characters in the installation folder name are a main cause of this problem. For example, there must be no space between the terms in the folder name. If the installation folder’s name is SQL Server 2008, changing it to SQLServer2008 or SQL Server 2008 is a good idea.
The failed installation can then be removed from the server using “Add and Remove Programs.” Finally, by right-clicking on the setup file and selecting “Run as administrator,” we may restart the installation.
Remove and reinstall the Windows installation
Another possibility for this error is a problem with the Windows installer. We may fix this by uninstalling and reinstalling the Windows installation.
a) Press the Start and Run buttons.
b) Type msiexec /unreg into the Run box, then press ENTER.
c) Press the Start and Run buttons.
d) Type msiexec /regserver into the Run box and press ENTER.
Stop the SQL port service from functioning.
TCP 1433, 4022, 135, 1434 are the common ports used by SQL Server and associated database engine services by default. Any other service operating on this port could cause the SQL installation to fail. As a result, we may need to terminate the service on that port.
To find the service running in the port,
1.Open command prompt as administrator.
2.Use the command netstat -a -n -o and it shows the result in the order “protocol, local IP:local port, foreign IP:foreign port, port state, and pid”.
3.View the local port and pid from the result in step 2.
4.Open task manager and navigate to details tab.
5.Search for the pid obtained in step 3 in the details tab to get the details of the service.
Now that we have the service name, we could either stop that service or change the port number of the service to complete the SQL installation
SQL Server Error Code and solution summary
SQL Server Error: 1639
Severity: 16
Event Logged or not: No
Description:
The eror occurs during installation of SQL Server
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2068052377
Start time: 2019-01-02 20:29:48
End time: 2019-01-02 20:31:24
Requested action: Install
Setup completed with required actions for features.
Troubleshooting information for those features:
Next step for SQLEngine: Use the following information to resolve the error, and then try the setup process again.
Machine Properties:
Machine name: DESKTOP-MSF6I7J
Machine processor count: 6
OS version: Microsoft Windows 10 Home (10.0.17134)
OS service pack:
OS region: United States
OS language: English (United Kingdom)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature Language Edition Version Clustered Configured
SQL Server 2017 Client Tools Connectivity 1033 14.0.1000.169 No Yes
SQL Server 2017 Client Tools Backwards Compatibility 1033 14.0.1000.169 No Yes
SQL Server 2017 Client Tools SDK 1033 14.0.1000.169 No Yes
SQL Server 2017 LocalDB 1033 Express Edition 14.0.1000.169 No Yes
Package properties:
Description: Microsoft SQL Server 2017
ProductName: SQL Server 2017
Type: RTM
Version: 14
SPLevel: 0
Installation location: C:\SQLServer2017Media\ExpressAdv_ENU\x64\setup\
Installation edition: Express
Product Update Status:
None discovered.
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: true
AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSERVERMODE: TABULAR
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: <empty>
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTELSVCACCT: <empty>
ASTELSVCPASSWORD: <empty>
ASTELSVCSTARTUPTYPE: 0
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CLTCTLRNAME: <empty>
CLTRESULTDIR: <empty>
CLTSTARTUPTYPE: 0
CLTSVCACCOUNT: <empty>
CLTSVCPASSWORD: <empty>
CLTWORKINGDIR: <empty>
COMMFABRICENCRYPTION: 0
COMMFABRICNETWORKLEVEL: 0
COMMFABRICPORT: 0
CONFIGURATIONFILE:
CTLRSTARTUPTYPE: 0
CTLRSVCACCOUNT: <empty>
CTLRSVCPASSWORD: <empty>
CTLRUSERS: <empty>
ENABLERANU: true
ENU: true
EXTSVCACCOUNT: <empty>
EXTSVCPASSWORD: <empty>
FEATURES: SQLENGINE
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: <empty>
HELP: false
IACCEPTPYTHONLICENSETERMS: false
IACCEPTROPENLICENSETERMS: false
IACCEPTSQLSERVERLICENSETERMS: true
INDICATEPROGRESS: false
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: C:\Program Files (x86)\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: SQLEXPRESS
INSTANCENAME: SQLEXPRESS
ISMASTERSVCACCOUNT: NT AUTHORITY\Network Service
ISMASTERSVCPASSWORD: <empty>
ISMASTERSVCPORT: 8391
ISMASTERSVCSSLCERTCN: <empty>
ISMASTERSVCSTARTUPTYPE: Automatic
ISMASTERSVCTHUMBPRINT: <empty>
ISSVCACCOUNT: NT AUTHORITY\Network Service
ISSVCPASSWORD: <empty>
ISSVCSTARTUPTYPE: Automatic
ISTELSVCACCT: <empty>
ISTELSVCPASSWORD: <empty>
ISTELSVCSTARTUPTYPE: 0
ISWORKERSVCACCOUNT: NT AUTHORITY\Network Service
ISWORKERSVCCERT: <empty>
ISWORKERSVCMASTER: <empty>
ISWORKERSVCPASSWORD: <empty>
ISWORKERSVCSTARTUPTYPE: Automatic
MATRIXCMBRICKCOMMPORT: 0
MATRIXCMSERVERNAME: <empty>
MATRIXNAME: <empty>
MRCACHEDIRECTORY:
NPENABLED: 0
PBDMSSVCACCOUNT: <empty>
PBDMSSVCPASSWORD: <empty>
PBDMSSVCSTARTUPTYPE: 0
PBENGSVCACCOUNT: <empty>
PBENGSVCPASSWORD: <empty>
PBENGSVCSTARTUPTYPE: 0
PBPORTRANGE: <empty>
PBSCALEOUT: false
PID: *****
QUIET: false
QUIETSIMPLE: false
ROLE: AllFeatures_WithDefaults
RSINSTALLMODE: DefaultNativeMode
RSSVCACCOUNT: <empty>
RSSVCPASSWORD: <empty>
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: SQL
SQLBACKUPDIR: <empty>
SQLCOLLATION: Latin1_General_CI_AS
SQLSVCACCOUNT: NT Service\MSSQL$SQLEXPRESS
SQLSVCINSTANTFILEINIT: false
SQLSVCPASSWORD: <empty>
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: DESKTOP-MSF6I7J\Owner
SQLTELSVCACCT: NT Service\SQLTELEMETRY$SQLEXPRESS
SQLTELSVCPASSWORD: <empty>
SQLTELSVCSTARTUPTYPE: Automatic
SQLTEMPDBDIR: <empty>
SQLTEMPDBFILECOUNT: 1
SQLTEMPDBFILEGROWTH: 64
SQLTEMPDBFILESIZE: 8
SQLTEMPDBLOGDIR: <empty>
SQLTEMPDBLOGFILEGROWTH: 64
SQLTEMPDBLOGFILESIZE: 8
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SUPPRESSPRIVACYSTATEMENTNOTICE: false
TCPENABLED: 0
UIMODE: AutoAdvance
UpdateEnabled: true
UpdateSource: MU
USEMICROSOFTUPDATE: false
X86: false
Configuration file: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20190102_202948\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Failed
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, and then try the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 1639
Component log file: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20190102_202948\sql_engine_core_inst_Cpu64_1.log
Error description: Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
Error help link: https://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
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: The rule result report file is not available.
McNets
23.5k9 gold badges46 silver badges87 bronze badges
asked Jan 2, 2019 at 19:32
1
Check out this line from the log you shared:
Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
Are you installing SQL Server Express from the command line? If so, please edit your question to include the full command line statement you’re using. You likely have some incompatible options selected.
For instance, the /IACCEPTSQLSERVERLICENSETERMS
parameter is required when using the Quiet or QuietSimple installation option. So if you use one without the other, you’ll get errors like this. Of course, this isn’t your problem in this specific case (as evidenced by the log), but hopefully it conveys my point that the different options interact with each other.
There’s a detailed reference of all the command line install options here:
Install SQL Server from the Command Prompt
answered Jan 2, 2019 at 21:49
Josh DarnellJosh Darnell
28.8k5 gold badges63 silver badges117 bronze badges