(last updated: 2019-11-08 @ 00:30 EST / 2019-11-08 @ 05:30 UTC )
I had gone through the process of uninstalling the now obsolete SQL Server 2019 CTP, and then installing the new CTP, for the four previous updates and did not encounter any problems. But this time, something was different. (howâs that for a click-baity tag line)
The other day, I was <sarcasm>blessed / honored / delighted</sarcasm> to waste several hours attempting to install SQL Server 2019 CTP 2.5 over and over again. Each time it would get through the first several steps of the installation process, but then encounter some condition causing it to rollback and finally end with the <sarcasm>super helpful</sarcasm> error message of:
An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Â
Use the following information to resolve the error, and then try the setup process again.
That might have been ok had there actually been any information that followed. But no, there was none, not even a small piece of unhelpful information.
TL; DR You can skip to the solution, if you donât want the details (but seriously, who doesnât want all of the exciting details?)
Â
Had I done anything differently this time? The only thing I can think of is that, after uninstalling the SQL Server 2019 CTP 2.4 instance, I checked the list of installed apps and noticed that âSQL Browserâ, âVSS Writerâ, and âT-SQL Language Serviceâ were still installed. I couldnât remove âSQL Browserâ or âVSS Writerâ due to dependencies: SQL Server 2017 was still using them. But, I was allowed to uninstall âT-SQL Language Serviceâ. I donât know if this was a factor in the install failing (seems unlikely), but it was something that I had not done when uninstalling previous CTPs.
Â
First: reduce custom install configuration
With no other information to go on, I thought that maybe it was a permissions issue with the account I specified as the service account for the âDatabase Engineâ and âSQL Server Agentâ services. I was using the âSQL Serverâ account that I was already using for SQL Server 2017 Developer Edition, so I figured it would work and so was not using the default service accounts. And I had found a few posts / articles mentioning possible install issues due to permissions. But using the default accounts didnât help.
I couldnât reduce the components / features that I was installing because I was only installing the âDatabase Engine Servicesâ. The first time I attempted the install I had selected âClient Tools Connectivityâ, âClient Tools SDKâ, and âSQL Client Connectivity SDKâ. And one of those, canât remember which one, is always pre-checked and disabled such that it canât be unchecked, so I only really added two of them. Those components installed successfully during the first install attempt, and for the subsequent attempts all three were pre-checked and disabled such that they couldnât be unchecked.
I thought that perhaps my choice of default collation was too extravagant: first series of attempts were using UTF8_BIN2
(renamed to Latin1_General_100_BIN2_UTF8
in CTP 3.0, I believe), second series of attempts were using Japanese_XJIS_140_CI_AS_UTF8
. But then I noticed that the folder for the instance â C:\Program Files\Microsoft SQL Server\MSSQL15.SQL2019 â had not been created, so I figured that the installation process had never even gotten far enough to care about the collation.
So far there is absolutely no useful information to help determine the source of the problem!!
Â
Second: check the âSummaryâ log file
C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log\YYYYMMDD_HHMMSS\Summary_{MachineName}_YYYYMMDD_HHMMSS.txt
At the top of the file:
Overall summary: Final result: Failed: see details below Exit code (Decimal): -2068643839
And, towards the bottom of the file:
Detailed results: Feature: Database Engine Services Status: Failed Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail. Next Step: Use the following information to resolve the error, and then try the setup process again.
There was no information that followed. The âRules report fileâ showed that all rules had passed.
So far there is absolutely no useful information to help determine the source of the problem!!
Third: check the âDetailsâ log file
C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log\YYYYMMDD_HHMMSS\Detail.txt
This was the first place where I actually found something useful. The following block of entries was towards the end of the file (line 23,527 out of 25,392):
(each of the following lines was prefixed with (01) 2019-04-29 20:57:28 Slp:
, but I removed that prefix so the output would be more readable)
---------------------------------------------------------------------- Running Action: Install_msoledbsql_Cpu64_Action SetFeaturePropsModifyInstallAction for msoledbsql_Cpu64 Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine Sco: Attempting to open registry subkey Sco: Attempting to open registry subkey SOFTWARE\Microsoft\VisualStudio\14.0 Sco: Attempting to get registry value InstallDir Checkpoint: PREINSTALL_MSOLEDBSQL_CPU64_ACTION Sco: Waiting for service 'msiserver' to accept the stop request. Sco: Attempting to open SC Manager Sco: Attempting to open service handle for service msiserver Invoking QueryServiceStatus Win32 API Sco: Attempting to close service handle for service msiserver Sco: Attempting to close SC Manager Target package: "F:\1033_ENU_LP\x64\setup\x64\msoledbsql.msi" InstallPackage: MsiInstallProduct returned the result code 1602. No retry-able MSI return code detected. ExecuteActionWithRetryHelper.Failed actionToExecute is 'Install_msoledbsql_Cpu64_Action', stack trace at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClass2_0.<ExecuteActionWithRetryHelper>b__0() at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionEngine.RunActionQueue() at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClass2_0.<ExecuteActionWithRetryHelper>b__0() at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionEngine.RunActionQueue() at Microsoft.SqlServer.Setup.Chainer.Workflow.Workflow.RunWorkflow(WorkflowObject workflowObject, HandleInternalException exceptionHandler) at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClass2_0.<ExecuteActionWithRetryHelper>b__0() at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionEngine.RunActionQueue() at Microsoft.SqlServer.Setup.Chainer.Workflow.Workflow.RunWorkflow(WorkflowObject workflowObject, HandleInternalException exceptionHandler) at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClass2_0.<ExecuteActionWithRetryHelper>b__0() at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream) at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionEngine.RunActionQueue() at Microsoft.SqlServer.Setup.Chainer.Workflow.Workflow.RunWorkflow(WorkflowObject workflowObject, HandleInternalException exceptionHandler) at Microsoft.SqlServer.Chainer.Setup.Setup.RunRequestedWorkflow() at Microsoft.SqlServer.Chainer.Setup.Setup.Run(String[] args) at Microsoft.SqlServer.Chainer.Setup.Setup.Start(String[] args) at Microsoft.SqlServer.Chainer.Setup.Setup.Main() Error: Action "Install_msoledbsql_Cpu64_Action" failed during execution. Completed Action: Install_msoledbsql_Cpu64_Action, returned False
Ok, so thereâs some problem with installing msoledbsql.msi. Unfortunately, error code â1602â means âUser cancelled installationâ according to the documentation for âMsiExec.exe and InstMsi.exe Error Messagesâ (just search for â1602â). And no, I did not cancel the install. There wasnât even a dialog window asking if I wanted to cancel.
Searching the interwebs for âmsoledbsql.msiâ and â1602â did not find anything useful.
However, even though there is no specific error message here, I now have a clue, some direction to go in, at least.
Â
Fourth: run âmsoledbsql.msiâ manually
Since there was no error message in the log file from this .msi, I figured that I could run it manually and if there was an error, I would be more likely to see it this way (as opposed to the installer process that might be swallowing / discarding the error).
So, I ran: F:\1033_ENU_LP\x64\setup\x64\msoledbsql.msi (I had mounted the install ISO image on F: )
and I got a pop-up asking if I wanted to: âModifyâ, âRepairâ, or âRemoveâ the feature. I chose âRepairâ and clicked the âNext >â button. It proceeded and completed without error. I tried to install SQL Server again but no luck.
Â
Fifth: run âmsoledbsql.msiâ manually (again)
So, I ran: F:\1033_ENU_LP\x64\setup\x64\msoledbsql.msi again.
This time I chose âModifyâ and clicked the âNext >â button. The top option, âClient Componentsâ, was already installed. But the bottom option, âOLE DB Driver for SQL Server SDKâ, was not installed (option drop-down had the red âXâ on it). I selected âWill be installed on local hard driveâ and clicked the âNext >â button. It copied some files (I think), but then strangely popped-up another modal dialog window with the message âPlease insert the diskâ, and I could either âContinueâ (or maybe it was âRetryâ) or âExitâ. I have no disk; I am installing from an ISO file. I have no idea what it was asking for or why, clicking âContinueâ did not make the dialog go away, so I clicked the âExitâ button. Strange days indeed (most peculiar, Mama) 1
Â
Sixth: check component-specific log file
At this point I noticed that there were log files for both msoledbsql and msodbcsql. I opened the following file:
C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log\YYYYMMDD_HHMMSS\msoledbsql_Cpu64_1.log
and found the following entries that seemed relevant:
******* Product: F:\1033_ENU_LP\x64\setup\x64\msoledbsql.msi Client-side and UI is none or basic: Running entire install on the server. Running installation inside multi-package transaction F:\1033_ENU_LP\x64\setup\x64\msoledbsql.msi Original package ==> F:\1033_ENU_LP\x64\setup\x64\msoledbsql.msi Package we're running from ==> C:\WINDOWS\Installer\26fed74a.msi ... Action start 13:55:08: InstallFinalize. (all following lines prefixed with "MSI (s) (C4:3C) [13:55:08:775]: ") Executing op: ProductInfo(ProductKey={EE6D1BC2-277F-4841-8FC9-DE132F856BB8},ProductName=Microsoft OLE DB Driver for SQL Server,PackageName=msoledbsql.msi,Language=1033,Version=302120961,Assignment=1,ObsoleteArg=0,ProductIcon=ARPIco,,PackageCode={DC3E55C2-2EBF-44C7-9AA0-20F606EE52D9},,,InstanceType=0,LUASetting=0,RemoteURTInstalls=0,ProductDeploymentFlags=3) ... Executing op: ActionStart(Name=InstallFiles,Description=Copying new files,Template=File: [1], Directory: [9], Size: [6]) Executing op: ProgressTotal(Total=261192,Type=0,ByteEquivalent=1) Executing op: SetTargetFolder(Folder=C:\Program Files (x86)\Microsoft SQL Server\Client SDK\OLEDB\182\SDK\Include\) Executing op: SetSourceFolder(Folder=1\PFiles32\SqlServr\npeqpcjk\OLEDB\182\SDK\Include\|Program Files (x86)\Microsoft SQL Server\Client SDK\OLEDB\182\SDK\Include\) Executing op: ChangeMedia(MediaVolumeLabel=MSOLEDBSQL,MediaPrompt=Please insert the disk: ,MediaCabinet=Redist.cab,BytesPerTick=65536,CopierType=2,ModuleFileName=1\msoledbsql.msi,,,,,IsFirstPhysicalMedia=1) Executing op: FileCopy(SourceName=ajgw2rxy.h|msoledbsql.h,SourceCabKey=DP_msoledbsql_h_32,DestName=msoledbsql.h,Attributes=0,FileSize=127016,PerTick=65536,,VerifyMedia=1,,,,,CheckCRC=0,,,InstallMode=58982400,HashOptions=0,HashPart1=-166821620,HashPart2=2086766155,HashPart3=-481314369,HashPart4=1222801502,,) File: C:\Program Files (x86)\Microsoft SQL Server\Client SDK\OLEDB\182\SDK\Include\msoledbsql.h; To be installed; Won't patch; No existing file Source for file 'DP_msoledbsql_h_32' is compressed Note: 1: 2203 2: F:\msoledbsql.msi 3: -2147287038 Source is incorrect. Unable to open or validate MSI package F:\msoledbsql.msi. Note: 1: 2203 2: F:\msoledbsql.msi 3: -2147287038 Source is incorrect. Unable to open or validate MSI package F:\msoledbsql.msi. Please insert the disk: Note: 1: 2265 2: 3: -2147287035 ... Note: 1: 1729 Product: Microsoft OLE DB Driver for SQL Server -- Configuration failed. Windows Installer reconfigured the product. Product Name: Microsoft OLE DB Driver for SQL Server. Product Version: 18.2.1.0. Product Language: 1033. Manufacturer: Microsoft Corporation. Reconfiguration success or error status: 1602. Deferring clean up of packages/files, if any exist MainEngineThread is returning 1602
There were several places that noted the source package, F:\1033_ENU_LP\x64\setup\x64\msoledbsql.msi, which was correct. But, towards the end of the entries shown above, it shows âSource is incorrect. Unable to open or validate MSI package F:\msoledbsql.msi. Please insert the disk:â. Here we have not one, but two bits of useful info:
- an incorrect source location: F:\msoledbsql.msi (most likely the problem)
- the message that I saw in the modal dialog when I ran the installer manually: âPlease insert the diskâ (if the background process installing this package received the same prompt that I saw in the modal dialog, then it looks like it tried to âContinueâ twice and then gave up, which could explain the result code of 1602, meaning âUser Cancelledâ, as that was the only other option if âContinueâ didnât work).
Awesome. Now weâre cooking with gas! 2
Comparing the details from the current log file with the log file from the CTP 2.2 install (one of the few times it reinstalled the OLEDB package), I noticed that the CTP 2.2 log file was longer. The extra lines were from uninstall steps, where the installed version of msoledbsql was being uninstalled before the new version was installed. That makes perfect sense. What does not make sense is why the CTP 2.5 log file was not showing any uninstall steps. MsOleDb was still installed as I found the DLL in C:\Windows\System32. Iâm not sure why it was not being uninstalled, but rather than argue about it, I figured I would just uninstall it myself.
Â
Seventh: uninstall ODBC, install OLEDB manually
I went to âAdd or Remove Programsâ (âApps & featuresâ under âSettingsâ in Windows 10), searched for âodbcâ (while Iâve been focusing on OLEDB, the exact same problem was happening with ODBC), and found âMicrosoft ODBC Driver 17 for SQL Serverâ. I uninstalled it.
I then searched for âoledbâ, and nothing came up. Hmm.
Idea đĄ:
- I know where the installer .msi file is,
- I know that, for some strange reason, the process looks in the root directory of the drive that the .msi file is on (how else would it know of F:\ ?)
- I know that I cannot copy F:\1033_ENU_LP\x64\setup\x64\msoledbsql.msi to F:\ since the F: drive is a virtual drive based on the contents of the .iso file (hence: read-only).
- HOWEVER, I also know that I can copy the .msi file to the C:\ directory, which is the root directory of a writable drive.
So, I copied the .msi file, ran it, selected that the SDK option should run from the local hard drive, and this time it succeeded!
Â
Eighth: try installing SQL Server 2019 CTP 2.5 (for the 10th time!)
This time it worked! It finally worked!!! Woo hoo! Hours and hours of my life gone, but itâs working now. And Iâm posting this so that hopefully others donât waste so much time trying to figure this out.
And, as luck would have it, looking back at the âAdd or Remove Programsâ / âApps & featuresâ list to get the specific name for ODBC for this post, I typed in âoleâ and guess what showed up: âMicrosoft OLE DB Driver for SQL Serverâ. And no, this is not new since I got it installed successfully. This had been there the whole time given that the install date is prior to when I was installing CTP 2.5. The issue was simply that I had typed âoledbâ (no space between âoleâ and âdbâ) too quickly and the list didnât apply the filter until I had typed the whole thing. Serves me right for not using the hunt-and-peck method of typing đ.
STEPS TO FIX
Try this first
- Go to âAdd or remove programsâ (âApps & featuresâ in Windows 10). You can get there in any of the following ways:
- Open Control Panel
- Go to âUninstall a programâ (under âProgramsâ, but you should be able to click on it directly from the main Control Panel screen)
- In Windows 10, go to the âStartâ menu (hit the âWindowsâ key), then type in âappsâ and it should be the first option
- In Windows 10, go to âSettingsâ by hitting the âWindowsâ key + âiâ, then go to âappsâ
- Open Control Panel
- Search for âodbcâ
- Find the search box:
- In âControl Panel\Programs\Programs and Featuresâ, itâs in the upper right-hand corner (and says âSearch Programs and Featuresâ)
- In âApps & featuresâ, itâs just above the program list on the right side (and says âSearch this listâ)
- Type in âodbcâ. If you have multiple versions of SQL Server installed, you might have multiple versions of ODBC installed. I have versions 13 and 17 installed.
- Uninstall only âMicrosoft ODBC Driver 17 for SQL Serverâ
- In âControl Panel\Programs\Programs and Featuresâ, right-click on âMicrosoft ODBC Driver 17 for SQL Serverâ and select âUninstallâ
- In âApps & featuresâ, select (i.e. left-click) âMicrosoft ODBC Driver 17 for SQL Serverâ and click the âUninstallâ button
- Find the search box:
- Search for âoleâ
- Find the search box
- Type in âoleâ. Most likely there is only one entry in the list.
- Uninstall âMicrosoft OLE DB Driver for SQL Serverâ
- (optional) Search for ânativeâ
- According to helpful commenter Vemund (vha66), this process might need to also be done for âSQL Server Native Clientâ / âsqlncli.msiâ. I did not run into this problem, but that could be due to already having Native Client installed as I have several previous versions of SQL Server on my laptop for testing. I am guessing that Vemund installed Native Client via the CTP.
- Find the search box
- Type in ânativeâ. Most likely there is only one entry in the list.
- Uninstall âMicrosoft SQL Server 2012 Native Clientâ
- Install SQL Server 2019 đș
Â
Try this if uninstalling âODBCâ, âOLE DBâ, and âSQL Server Native Clientâ drivers did not work (or were not installed)
- Copy F:\1033_ENU_LP\x64\setup\x64\msodbcsql.msi , and/or F:\1033_ENU_LP\x64\setup\x64\msoledbsql.msi , and/or optionally F:\1033_ENU_LP\x64\setup\x64\sqlncli.msi (I had mounted the install ISO image on F: ) to C:\
- Run C:\msodbcsql.msi
- Select âModifyâ (default option) and then click the âNext >â button
- Change the selected option for âODBC Driver for SQL Server SDKâ to be âWill be installed on local hard driveâ
- Click the âNext >â button
- Click the âInstallâ button
- Repeat steps 2 â 6 for C:\msoledbsql.msi
- Optionally repeat steps 2 â 6 for C:\sqlncli.msi (I did not have to do this step, but as noted in Step 4 of the âTry this firstâ steps directly above, at least one person did)
- Install SQL Server 2019 đș
- Delete C:\msodbcsql.msi , and/or C:\msoledbsql.msi , and/or C:\sqlncli.msi (whichever ones you had copied to C:\ in Step 1)
- Lyric from âNobody Told Meâ by John Lennon. I donât really like the song, but I was thinking âstrange indeedâ and the lyric just popped into my head. â©
- An idiom meaning âDo very well, make rapid progressâ. Please see cook with gas (meaning) and Origin of the phrase âNow weâre cooking with _â on English.StackExchange (etymology). â©