Skip to content

Realcase: Failed to upgrade SQL Server 2016 SP2 CU11. (Installation success or error status: 1648)

One of my customer failed to upgrade SQL Server 2016 SP2 CU11.
Here is the troubleshooting steps

1.Check SQL Server setup log(C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\)

Detailed results:
  Feature:                       Database Engine Services
  Status:                        Failed: see logs for details
  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.
  Component name:                SQL Server Common Files
  Component error code:          1648
  Component log file:            C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\20191217_193009\SQLAG\sql_common_core_Cpu64_1.log
  Error description:             No valid sequence could be found for the set of updates.
  Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=13.0.5337.0&EvtType=sql_common_core.msi%400x162A16FE%400x1648

2.Reviewed the File sql_common_core_Cpu64_1.log

MSI (s) (78:C0) [19:43:48:678]: APPCOMPAT: looking for appcompat database entry with ProductCode '{57846DA8-8B5D-4466-B850-E8CDFC94046C}'.
MSI (s) (78:C0) [19:43:48:678]: APPCOMPAT: no matching ProductCode found in database.
MSI (s) (78:C0) [19:43:48:678]: Opening existing patch 'c:\windows\Installer\583222d.msp'.
MSI (s) (78:C0) [19:43:48:694]: Note: 1: 2205 2:  3: MsiPatchSequence 
MSI (s) (78:C0) [19:43:48:694]: Opening existing patch 'C:\windows\Installer\1540d9.msp'.
MSI (s) (78:C0) [19:43:48:694]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer 3: 2 
MSI (s) (78:C0) [19:43:48:694]: File will have security applied from OpCode.
MSI (s) (78:C0) [19:43:49:960]: Original patch ==> C:\sp2\x64\setup\sql_common_core_msi\sql_common_core.msp
MSI (s) (78:C0) [19:43:49:960]: Patch we're running from ==> C:\windows\Installer\583222d.msp
MSI (s) (78:C0) [19:43:49:960]: SOFTWARE RESTRICTION POLICY: Verifying patch --> 'C:\sp2\x64\setup\sql_common_core_msi\sql_common_core.msp' against software restriction policy
MSI (s) (78:C0) [19:43:49:960]: SOFTWARE RESTRICTION POLICY: C:\sp2\x64\setup\sql_common_core_msi\sql_common_core.msp has a digital signature
MSI (s) (78:C0) [19:43:50:007]: SOFTWARE RESTRICTION POLICY: C:\sp2\x64\setup\sql_common_core_msi\sql_common_core.msp is permitted to run at the 'unrestricted' authorization level.
MSI (s) (78:C0) [19:43:50:007]: SequencePatches starts. Product code: {57846DA8-8B5D-4466-B850-E8CDFC94046C}, Product version: 13.0.1601.5, Upgrade code: {F2F6463E-EE2A-4C0B-B399-F550C887354A}, Product language 1033
MSI (s) (78:C0) [19:43:50:007]: Note: 1: 2205 2:  3: MsiPatchSequence 
MSI (s) (78:C0) [19:43:50:007]: Note: 1: 2203 2: RTM.1 3: -2147287038 
MSI (s) (78:C0) [19:43:50:007]: PATCH SEQUENCER ERROR: failed to open RTM.1 transform in {DC33A855-F84A-4772-95CB-1C47EFE27DAD} patch! (1: 2203 2: RTM.1 3: -2147287038 )
MSI (s) (78:C0) [19:43:50:007]: SequencePatches returns error 1648.
MSI (s) (78:C0) [19:43:50:007]: Product: SQL Server 2016 Common Files - Update '{947AECBA-66AD-4F92-A153-7192D8C27963}' could not be installed. Error code 1648. Additional information is available in the log file C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\20191217_193009\SQLAG\sql_common_core_Cpu64_1.log.

MSI (s) (78:C0) [19:43:50:007]: Windows Installer installed an update. Product Name: SQL Server 2016 Common Files. Product Version: 13.0.1601.5. Product Language: 1033. Manufacturer: Microsoft Corporation. Update Name: {947AECBA-66AD-4F92-A153-7192D8C27963}. Installation success or error status: 1648.

MSI (s) (78:C0) [19:43:50:007]: Note: 1: 1708 
MSI (s) (78:C0) [19:43:50:007]: Product: SQL Server 2016 Common Files -- Installation failed.

MSI (s) (78:C0) [19:43:50:007]: Windows Installer installed the product. Product Name: SQL Server 2016 Common Files. Product Version: 13.0.1601.5. Product Language: 1033. Manufacturer: Microsoft Corporation. Installation success or error status: 1648.

MSI (s) (78:C0) [19:43:50:007]: Attempting to delete file C:\windows\Installer\5c2971d.msp
MSI (s) (78:C0) [19:43:50:007]: MainEngineThread is returning 1648
MSI (s) (78:44) [19:43:50:007]: No System Restore sequence number for this installation.
No valid sequence could be found for the set of updates.

3.Here is how SQL Server upgraded to CU11 for sql_common_core.msp:
1)It runs the file of sql_common_core.msp of each patch.
In this case, it has two version of sql_common_core.msp ,SQL Server 2016 SP1 and SQL Server 2016 SP2.
2)’c:\windows\Installer\583222d.msp’ is for SQL Server 2016 SP2 and ‘C:\windows\Installer\1540d9.msp’ is for SQL Server 2016 SP1.

3)It failed to run 583222d.msp and caused entire upgrading fail.

The following screenshot is how I find the real names of two files. Please read this article for more detail.

image

4.I RDP to the SQL Server windows server, I found that something strange:
The size of is only 20KB, which is abnormal.

image
5.I download the SQL Server 2016 SP2 and compared, the correct size is around 4.7MB.
6.Then I replaced the invalid the file with the file I extracted from SP2.
7.Tried the installation and it worked.

—Update 3/9/2020—-
Here is how you run into this issue.
1.You have a SQL Server 2016 SP2 installed, the SQL Server is functional.
2.Some msp files of SQL Server 2016 RTM, CU,SP1 and SP2 are removed somehow.
3.All the patching fails after that.
4.Then you try to FixMissingMSI tool to fix the issue.
5.The FixMissingMSI lists all the missing MSP files, including RTM, CU, SP1 and SP2,ect.

missingMsi
6.You click theĀ  ‘fix’ button to fix all…, Bang!!! you will see the 20kb files…
7.This is because those missing MSP files belong to different version, you can’t just specify one folder for all versions.
8.The suggested way is to fix missing MSP files for only one version each time.

9.In this screenshot, there are 4 missing files belong to 3 different version. You need to click the ‘Fix it’ button for individual missing file. And only the missing files should match the version of the folder you specified before scanning.

Let’s say, the folder has the is for SQL Server 2016 SP2. Then only click the ‘Fix it’ for SQL 2016 SP2 missing files.

missingMsi2

After they are fixed, specify a new folder and do the scan again… repeat until all files are fixed.

1 Comment »

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: