Use Orca.exe Tool to Verify Corrupted MSI/MSP file in Failed SQL Patching

Published Nov 14 2021 05:08 AM 1,050 Views
Microsoft

DISCLAIMER : THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

 

Multiple reasons can cause the failure of installing SQL Server patch. For example, corrupted registry key record for your SQL components , missing or corrupted MSI/MSP files for your SQL components, lack of permission for the required file or file in use during patch installation process, etc.

 

One of the common causes is corrupted SQL Server's Windows Installer database file (.MSI) or the Windows Installer patch file (.MSP) cached in your local server's Windows Installer Cache folder located on %windir%\installer. This type of corruption can happen frequently when you have anti-virus software, VM backup tool, or 3rd party security software that scans the file/folder.

 

 

As enlightened by a discussion with my colleague Richard Chen, SQL Server Escalation Engineer and a couple of cases investigation, this article discusses a simple way to narrow down the corruption and resolve this type of corrupted MSI/MSP file issue via Orca.exe tool that cannot be easily detected by FixMissingMSI tool nor fixed by 'Repair' option provided by 'setup.exe' program. (Similar error has also been discussed on this blog while a few other common issues for failed SQL patch/uninstallation are discussed already on this official document.)

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Depends on the features you have installed for your SQL Server, a few shared components of SQL Database Engine and SQL feature-based components will be verified and patched during one sitting of patch installation process. If any of these required components' MSI/MSP file or registry key record is unreachable(for example, corrupted file, missing registry key removed by 3rd party anti-virus tool, etc.), the patch installation process will fail. 

 

Please be noted that multiple issues can all play a role in your server that contribute to the patch failure. For example, your MSP files are corrupted while you also have a few registry key record missing. In this case, after resolving one issue, you will hit a different exception next time when you try to install. We need to resolve them one by one in order to successfully complete the patch installation process. 

 

(NOTE: It is recommended to take backup of all related files before the change to ensure we don't have any potential data loss.)

 

Symptoms

=======

You have encountered error 'No valid sequence could be found for the set of updates' in 'Details.txt' log for your failed patch attempt.

 

You have tried to use FixMissingMSI tool to restore all your issued MSI/MSP files on the server .

 

You also tried 'Repair' option provided by setup.exe program to recover your SQL instance.

 

However, the same failure persists. 

 

Troubleshooting

===========

 

Step 1: Check 'Details.txt' log in your SQL Server version's Setup Bootstrap 'Log' folder to narrow down the cause of the patch installation failure.

 

The 'Log' folder in the 'Setup Bootstrap' folder stores log and error details for all installation, uninstallation , and repair attempts for your SQL instance on the server. 

    

Default Path:  “C:\Program Files\Microsoft SQL Server\<Your SQL Version Number>\Setup Bootstrap\Log\<Your Issued Setup Timestamp>”

 

Step 2: If you see below error 'no valid sequence could be found' in 'Details.txt' log, search for all of this error's occurrence on this log and note down all the SQL components' name that encounters this exception(example see below).

 

This exception means the sequence number for this component's cached MSI/MSP file fails to be mapped during the process of installing subsequence patch. It can either be caused by corrupted MSI/MSP file or missing/corrupted record on the registry key that record the related component's MSI/MSP file information

 

2021-10-20 14:02:01 Slp: No valid sequence could be found for the set of updates.

2021-10-20 14:02:01 Slp: Watson bucket for Msi based failure has been created

2021-10-20 14:02:01 Slp: Error: Action "Install_sql_*****_Action" failed during execution. <---------in here will print the name of the SQL component that encounters this exception during the upgrade process.

 

Step 3: Go to each of the issued component's separate log (These logs are stored on the same folder) and check if we have hit error "PATCH SEQUENCER ERROR: failed to open **". If that's the case, check the actual cached MSI and MSP files' name used in the sequence patch process in the log as the example in my LAB showed in below.   

 

These MSI and MSP files are used in the patch sequence verification process and some of their information suspected to be compromised to cause the patch sequence verification failure. We will need to verify the actual file's integrity as well as the mapping registry key record to narrow down the problem. 

 

MSI : Opening existing patch 'C:\Windows\Installer\12a3b45.msp'.  //*Testing example file name as each of these MSP files should be uniquely named in your server *//

MSI : Opening existing patch 'C:\Windows\Installer\23a4f56.msp'. //*Testing example file name as each of these MSP files should be uniquely named in your server *//

MSI : Note: 1: ******:  3: MsiPatchSequence

MSI : Patch we're running from ==> C:\Windows\Installer\c12d345.msp//*Testing example file name as each of these MSP files should be uniquely named in your server *//

MSI : SequencePatches starts. Product code: *****, Product version: *****, Upgrade code: ****, Product language ****

MSI : Note: 1  MsiPatchSequence

MSI : Note: 1: Target01ToUpgrade01 ****

MSI : PATCH SEQUENCER ERROR: failed to open Target01ToUpgrade01 transform in ****** patch! (****** )

 

Step 4 : Check the MSP file 's integrity on Windows Installer Cache folder, located in c:\windows\installer.  Use Orca.exe tool ( a public tool shipped with Windows SDK - MSI tool in this link) to open each of these MSI/MSP files and check its integrity. A common issue you will see is missing the 'MsiPatchSequence' table for this file on Orca.exe's result. When this happens, the file's internal sequence information is corrupted and thus, will cause the error for failing the sequence patch process. Below is an example of a corrupted MSP file on an issued server and a healthy copy of the same MSP file extracted from its corresponding source SQL patch package. 

 

1) Corrupted MSP file's Orca result : missing the 'MsiPatchSequence' table

 

EstherXinMSFT_0-1636889105296.png

 

2) A healthy copy for the same MSP file extracted from its source SQL patch package 

 

EstherXinMSFT_1-1636889105321.png

Step 5:  In order to fix this corrupted MSI/MSP file, you will need to get a healthy copy for the same file from its source SQL patch package. To do so, you will need to know its source SQL patch's KB number or version and its original name before cached to your local server.  You can either directly get it from the Orca.exe's result or use the SQLInstall.vbs script's result to check as sometimes the file may be too corrupted to be queried by the Orca.exe tool.  SQLInstall.vbs will script out all your existing SQL instances' MSI and MSP file information as long as they exist on your registry key record. Sometimes if the corresponding registry key record is missing or corrupted, you will also not get any valid information for this MSI/MSP file in the script result. Below is the steps for getting this script's result (you can also refer to this official document that discusses it)

 

1) Download the FindSQLInstalls.vbs from its raw page in this link

2) Select all of the contents on this page, copy, and paste it to a text file. Save the text file as FindSQLInstalls.vbs.

3) Open an elevated command prompt to the directory to which you saved the FindSQLInstalls.vbs file, and run the command: Cscript FindSQLInstalls.vbs %computername%_sql_install_details.txt.

4) Open the file output from Step 3, and search for your issued MSI/MSP file's actual cached name on your server. Then, you will get its registry key record result as scanned by this script.

 

Step 6: Once you get the information in step 5, download the SQL patch package and then, you will need to extract the package directly. Once you get the healthy copy of the file, rename it to its cached name as you find on the component's log and replace the corrupted one with this new copy in the Windows Cache folder. You can use below script to extract your SQL patch package. 

 

1) Download the target SQL patch package from Microsoft Catalog

2) Open an elevated CMD window and change the directory to the path where you have stored the downloaded package:

 

pushd C:\temp\package

 

3) Run the same command for each “.exe” file in the package to extract installation files into the same destination path (the new folder created in step 2) by changing the file name and the destination path in below script. Each time you execute the command, a pop up window may ask you to specify the destination path. Please ensure it is the path specified.

SQLServer2016SP1-KB3182545-x64-ENU.exe /s /x /b"C:\temp\youroutputfoldername" /v"/qn" 

 

EstherXinMSFT_2-1636893263070.jpeg

 

Step 7: Perform the same check for all the SQL components that hit the exactly same exception and ensure the corrupted MSI/MSP files are replaced. Retry the patch installation. If you hit failure again, check the latest 'Details.txt' log first and narrow down the new exception for next step of resolution. 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2963306%22%20slang%3D%22en-US%22%3EUse%20Orca.exe%20Tool%20to%20Verify%20Corrupted%20MSI%2FMSP%20file%20in%20Failed%20SQL%20Patching%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2963306%22%20slang%3D%22en-US%22%3E%3CP%3E%3CEM%3EDISCLAIMER%20%3A%20THIS%20CODE%20AND%20INFORMATION%20IS%20PROVIDED%20%22AS%20IS%22%20WITHOUT%20WARRANTY%20OF%20ANY%20KIND%2C%20EITHER%20EXPRESSED%20OR%20IMPLIED%2C%20INCLUDING%20BUT%20NOT%20LIMITED%20TO%20THE%20IMPLIED%20WARRANTIES%20OF%20MERCHANTABILITY%20AND%20FITNESS%20FOR%20A%20PARTICULAR%20PURPOSE.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMultiple%20reasons%20can%20cause%20the%20failure%20of%20installing%20SQL%20Server%20patch.%20For%20example%2C%20corrupted%20registry%20key%20record%20for%20your%20SQL%20components%20%2C%20missing%20or%20corrupted%20MSI%2FMSP%20files%20for%20your%20SQL%20components%2C%20lack%20of%20permission%20for%20the%20required%20file%20or%20file%20in%20use%20during%20patch%20installation%20process%2C%20etc.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOne%20of%20the%20common%20causes%20is%20%3CU%3E%3CEM%3E%3CSTRONG%3Ecorrupted%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FU%3E%26nbsp%3BSQL%20Server's%20Windows%20Installer%20database%20file%20(.MSI)%20or%20the%20Windows%20Installer%20patch%20file%20(.MSP)%20cached%20in%20your%20local%20server's%20Windows%20Installer%20Cache%20folder%20located%20on%20%3CEM%3E%25windir%25%5Cinstaller%3C%2FEM%3E%3CSPAN%3E.%3C%2FSPAN%3E%26nbsp%3BThis%20type%20of%20corruption%20can%20happen%20frequently%20when%20you%20have%20anti-virus%20software%2C%20VM%20backup%20tool%2C%20or%203rd%20party%20security%20software%20that%20scans%20the%20file%2Ffolder.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%230000FF%22%3EAs%20enlightened%26nbsp%3Bby%20a%20discussion%20with%20my%20colleague%20Richard%20Chen%2C%20SQL%20Server%20Escalation%20Engineer%20and%20a%20couple%20of%20cases%20investigation%2C%20this%20article%20discusses%20a%20simple%20way%20to%20narrow%20down%20the%20corruption%20and%20resolve%20this%20type%20of%20corrupted%20MSI%2FMSP%20file%20issue%20via%20Orca.exe%20tool%20that%20cannot%20be%20easily%20detected%20by%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fsql-server-support%2Fsql-setup-toolsuite-introduction-1-8211-fixmissingmsi%2Fba-p%2F319079%22%20target%3D%22_blank%22%3EFixMissingMSI%20tool%3C%2FA%3E%20nor%20fixed%20by%20'Repair'%20option%20provided%20by%20'setup.exe'%20program.%20(Similar%20error%20has%20also%20been%20discussed%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fsql-server-support%2Fhow-to-fix-sql-patch-error-1648-no-valid-sequence-could-be-found%2Fba-p%2F1041559%22%20target%3D%22_blank%22%3Eon%20this%20blog%3C%2FA%3E%26nbsp%3Bwhile%20a%20few%20other%20common%20issues%20for%20failed%20SQL%20patch%2Funinstallation%20are%20discussed%20already%20on%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Ftroubleshoot%2Fsql%2Finstall%2Frestore-missing-windows-installer-cache-files%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eofficial%20document.)%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E----------------------------------------------------------------------------------------------------------------------------------------------------------------------%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDepends%20on%20the%20features%20you%20have%20installed%20for%20your%20SQL%20Server%2C%20a%20few%20shared%20components%20of%20SQL%20Database%20Engine%20and%20SQL%20feature-based%20components%20will%20be%20verified%20and%20patched%20during%20one%20sitting%20of%20patch%20installation%20process.%20If%20any%20of%20these%20required%20components'%20MSI%2FMSP%20file%20or%20registry%20key%20record%20is%20unreachable(for%20example%2C%20corrupted%20file%2C%20missing%20registry%20key%20removed%20by%203rd%20party%20anti-virus%20tool%2C%20etc.)%2C%20the%20patch%20installation%20process%20will%20fail.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20be%20noted%20that%20%3CSTRONG%3Emultiple%20issues%3C%2FSTRONG%3E%20can%20all%20play%20a%20role%20in%20your%20server%20that%20contribute%20to%20the%20patch%20failure.%20For%20example%2C%20your%20MSP%20files%20are%20corrupted%20while%20you%20also%20have%20a%20few%20registry%20key%20record%20missing.%20In%20this%20case%2C%20after%20resolving%20one%20issue%2C%20you%20will%20hit%20a%20different%20exception%20next%20time%20when%20you%20try%20to%20install.%20We%20need%20to%20resolve%20them%20one%20by%20one%20in%20order%20to%20successfully%20complete%20the%20patch%20installation%20process.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3E(NOTE%3A%3C%2FU%3E%20%3C%2FSTRONG%3EIt%20is%20recommended%20to%20take%20backup%20of%20all%20related%20files%20before%20the%20change%20to%20ensure%20we%20don't%20have%20any%20potential%20data%20loss.)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESymptoms%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3D%3D%3D%3D%3D%3D%3D%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EYou%20have%20encountered%20error%20'%3CSTRONG%3E%3CFONT%20color%3D%22%23FF0000%22%3ENo%20valid%20sequence%20could%20be%20found%20for%20the%20set%20of%20updates%3C%2FFONT%3E%3C%2FSTRONG%3E'%20in%20'Details.txt'%20log%20for%20your%20failed%20patch%20attempt.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20have%20tried%20to%20use%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fsql-server-support%2Fsql-setup-toolsuite-introduction-1-8211-fixmissingmsi%2Fba-p%2F319079%22%20target%3D%22_blank%22%3EFixMissingMSI%3C%2FA%3E%20tool%20to%20restore%20all%20your%20issued%20MSI%2FMSP%20files%20on%20the%20server%20.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20also%20tried%20'Repair'%20option%20provided%20by%20setup.exe%20program%20to%20recover%20your%20SQL%20instance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%2C%20the%20same%20failure%20persists.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETroubleshooting%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%201%3A%3C%2FSTRONG%3E%20%3CFONT%20color%3D%22%230000FF%22%3ECheck%20'Details.txt'%20log%20in%20your%20SQL%20Server%20version's%20Setup%20Bootstrap%20'Log'%20folder%20to%20narrow%20down%20the%20cause%20of%20the%20patch%20installation%20failure.%20%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20'Log'%20folder%20in%20the%20'Setup%20Bootstrap'%20folder%20stores%20log%20and%20error%20details%20for%20all%20installation%2C%20uninstallation%20%2C%20and%20repair%20attempts%20for%20your%20SQL%20instance%20on%20the%20server.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EDefault%20Path%3A%26nbsp%3B%3C%2FSTRONG%3E%20%3CFONT%20color%3D%22%23339966%22%3E%E2%80%9CC%3A%5CProgram%20Files%5CMicrosoft%20SQL%20Server%5C%3CYOUR%20sql%3D%22%22%20version%3D%22%22%20number%3D%22%22%3E%5CSetup%20Bootstrap%5CLog%5C%3CYOUR%20issued%3D%22%22%20setup%3D%22%22%20timestamp%3D%22%22%3E%E2%80%9D%3C%2FYOUR%3E%3C%2FYOUR%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%202%3A%3C%2FSTRONG%3E%20%3CFONT%20color%3D%22%230000FF%22%3EIf%20you%20see%20below%20error%20'no%20valid%20sequence%20could%20be%20found'%20in%20'Details.txt'%20log%2C%20search%20for%20all%20of%20this%20error's%20occurrence%20on%20this%20log%20and%20note%20down%20all%20the%20SQL%20components'%20name%20that%20encounters%20this%20exception(example%20see%20below).%20%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20exception%20means%20the%20sequence%20number%20for%20this%20component's%20cached%20MSI%2FMSP%20file%20fails%20to%20be%20mapped%20during%20the%20process%20of%20installing%20subsequence%20patch.%20It%20can%20either%20be%20caused%20by%20corrupted%20MSI%2FMSP%20file%20or%20missing%2Fcorrupted%20record%20on%20the%20registry%20key%20that%20record%20the%20related%20component's%20MSI%2FMSP%20file%20information%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2021-10-20%2014%3A02%3A01%20Slp%3A%20%3CSTRONG%3E%3CFONT%20color%3D%22%23FF0000%22%3ENo%20valid%20sequence%20could%20be%20found%20for%20the%20set%20of%20updates%3C%2FFONT%3E%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E2021-10-20%2014%3A02%3A01%20Slp%3A%20Watson%20bucket%20for%20Msi%20based%20failure%20has%20been%20created%3C%2FP%3E%0A%3CP%3E2021-10-20%2014%3A02%3A01%20Slp%3A%20Error%3A%20%3CSTRONG%3EAction%20%22Install_sql_*****_Action%22%20failed%3C%2FSTRONG%3E%20during%20execution.%20%26lt%3B---------in%20here%20will%20print%20the%20name%20of%20the%20SQL%20component%20that%20encounters%20this%20exception%20during%20the%20upgrade%20process.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%203%3A%3C%2FSTRONG%3E%20%3CFONT%20color%3D%22%230000FF%22%3EGo%20to%20each%20of%20the%20issued%20component's%20separate%20log%20(These%20logs%20are%20stored%20on%20the%20same%20folder)%20and%20check%20if%20we%20have%20hit%20error%20%22PATCH%20SEQUENCER%20ERROR%3A%20failed%20to%20open%20**%22.%20If%20that's%20the%20case%2C%20check%20the%20actual%20cached%20MSI%20and%20MSP%20files'%20name%20used%20in%20the%20sequence%20patch%20process%20in%20the%20log%20as%20the%20example%20in%20my%20LAB%20showed%20in%20below.%26nbsp%3B%20%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%230000FF%22%3EThese%20MSI%20and%20MSP%20files%20are%20used%20in%20the%20patch%20sequence%20verification%20process%20and%20some%20of%20their%20information%20suspected%20to%20be%20compromised%20to%20cause%20the%20patch%20sequence%20verification%20failure.%20We%20will%20need%20to%20verify%20the%20actual%20file's%20integrity%20as%20well%20as%20the%20mapping%20registry%20key%20record%20to%20narrow%20down%20the%20problem.%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMSI%20%3A%20Opening%20existing%20patch%20'C%3A%5CWindows%5CInstaller%5C%3CFONT%20color%3D%22%23FF0000%22%3E12a3b45.msp%3C%2FFONT%3E'.%26nbsp%3B%20%3CFONT%20color%3D%22%23008000%22%3E%2F%2F*Testing%20example%20file%20name%20as%20each%20of%20these%20MSP%20files%20should%20be%20uniquely%20named%20in%20your%20server%20*%2F%2F%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EMSI%20%3A%20Opening%20existing%20patch%20'C%3A%5CWindows%5CInstaller%5C%3CFONT%20color%3D%22%23FF0000%22%3E23a4f56.msp%3C%2FFONT%3E'.%20%3CFONT%20color%3D%22%23008000%22%3E%2F%2F*Testing%20example%20file%20name%20as%20each%20of%20these%20MSP%20files%20should%20be%20uniquely%20named%20in%20your%20server%20*%2F%2F%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EMSI%20%3A%20Note%3A%201%3A%20******%3A%26nbsp%3B%203%3A%20MsiPatchSequence%3C%2FP%3E%0A%3CP%3EMSI%20%3A%20Patch%20we're%20running%20from%20%3D%3D%26gt%3B%20C%3A%5CWindows%5CInstaller%5C%3CFONT%20color%3D%22%23FF0000%22%3Ec12d345.msp%3CFONT%20color%3D%22%23008000%22%3E%2F%2F*Testing%20example%20file%20name%20as%20each%20of%20these%20MSP%20files%20should%20be%20uniquely%20named%20in%20your%20server%20*%2F%2F%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EMSI%20%3A%20SequencePatches%20starts.%20Product%20code%3A%20*****%2C%20Product%20version%3A%20*****%2C%20Upgrade%20code%3A%20****%2C%20Product%20language%20****%3C%2FP%3E%0A%3CP%3EMSI%20%3A%20Note%3A%201%26nbsp%3B%20MsiPatchSequence%3C%2FP%3E%0A%3CP%3EMSI%20%3A%20Note%3A%201%3A%20Target01ToUpgrade01%20****%3C%2FP%3E%0A%3CP%3EMSI%20%3A%20%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EPATCH%20SEQUENCER%20ERROR%3A%20failed%20to%20open%20Target01ToUpgrade01%20transform%20in%20******%20patch!%20(******%20)%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSTRONG%3EStep%204%20%3A%20%3C%2FSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3ECheck%20the%20MSP%20file%20's%20integrity%20on%20Windows%20Installer%20Cache%20folder%2C%20located%20in%20c%3A%5Cwindows%5Cinstaller.%26nbsp%3B%20Use%20Orca.exe%20tool%20(%20a%20public%20tool%20shipped%20with%20Windows%20SDK%20-%20MSI%20tool%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fmsi%2Forca-exe%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ein%20this%20link%3C%2FA%3E)%20to%20open%20each%20of%20these%20MSI%2FMSP%20files%20and%20check%20its%20integrity.%20A%20common%20issue%20you%20will%20see%20is%20missing%20the%20'MsiPatchSequence'%20table%20for%20this%20file%20on%20Orca.exe's%20result.%20When%20this%20happens%2C%20the%20file's%20internal%20sequence%20information%20is%20corrupted%20and%20thus%2C%20will%20cause%20the%20error%20for%20failing%20the%20sequence%20patch%20process.%20Below%20is%20an%20example%20of%20a%20corrupted%20MSP%20file%20on%20an%20issued%20server%20and%20a%20healthy%20copy%20of%20the%20same%20MSP%20file%20extracted%20from%20its%20corresponding%20source%20SQL%20patch%20package.%26nbsp%3B%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSTRONG%3E1)%20Corrupted%20MSP%20file's%20Orca%20result%20%3A%3C%2FSTRONG%3E%20%3CFONT%20color%3D%22%23FF0000%22%3Emissing%20the%26nbsp%3B'MsiPatchSequence'%20table%20%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22EstherXinMSFT_0-1636889105296.png%22%20style%3D%22width%3A%20616px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F326935i8548E07825E355F0%2Fimage-dimensions%2F616x250%3Fv%3Dv2%22%20width%3D%22616%22%20height%3D%22250%22%20role%3D%22button%22%20title%3D%22EstherXinMSFT_0-1636889105296.png%22%20alt%3D%22EstherXinMSFT_0-1636889105296.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E2)%20A%20healthy%20copy%20for%20the%20same%20MSP%20file%20extracted%20from%20its%20source%20SQL%20patch%20package%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22EstherXinMSFT_1-1636889105321.png%22%20style%3D%22width%3A%20617px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F326936iFA46053A17EFEF6B%2Fimage-dimensions%2F617x252%3Fv%3Dv2%22%20width%3D%22617%22%20height%3D%22252%22%20role%3D%22button%22%20title%3D%22EstherXinMSFT_1-1636889105321.png%22%20alt%3D%22EstherXinMSFT_1-1636889105321.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%205%3A%26nbsp%3B%3C%2FSTRONG%3E%20%3CFONT%20color%3D%22%230000FF%22%3EIn%20order%20to%20fix%20this%20corrupted%20MSI%2FMSP%20file%2C%20you%20will%20need%20to%20get%20a%20healthy%20copy%20for%20the%20same%20file%20from%20its%20source%20SQL%20patch%20package.%20To%20do%20so%2C%20you%20will%20need%20to%20know%20its%20source%20SQL%20patch's%20%3CU%3E%3CSTRONG%3EKB%20number%3C%2FSTRONG%3E%3C%2FU%3E%20or%20version%20and%20its%20%3CU%3E%3CSTRONG%3Eoriginal%20name%3C%2FSTRONG%3E%3C%2FU%3E%20before%20cached%20to%20your%20local%20server.%26nbsp%3B%20You%20can%20either%20directly%20get%20it%20from%20the%20Orca.exe's%20result%20or%20use%20the%20SQLInstall.vbs%20script's%20result%20to%20check%20as%20sometimes%20the%20file%20may%20be%20too%20corrupted%20to%20be%20queried%20by%20the%20Orca.exe%20tool.%26nbsp%3B%20SQLInstall.vbs%20will%20script%20out%20all%20your%20existing%20SQL%20instances'%20MSI%20and%20MSP%20file%20information%20as%20long%20as%20they%20exist%20on%20your%20registry%20key%20record.%20Sometimes%20if%20the%20corresponding%20registry%20key%20record%20is%20missing%20or%20corrupted%2C%20you%20will%20also%20not%20get%20any%20valid%20information%20for%20this%20MSI%2FMSP%20file%20in%20the%20script%20result.%20Below%20is%20the%20steps%20for%20getting%20this%20script's%20result%20(you%20can%20also%20refer%20to%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Ftroubleshoot%2Fsql%2Finstall%2Frestore-missing-windows-installer-cache-files%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eofficial%20document%3C%2FA%3E%20that%20discusses%20it)%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1)%20Download%20the%20FindSQLInstalls.vbs%20from%20its%20raw%20page%20%3CA%20href%3D%22https%3A%2F%2Fraw.githubusercontent.com%2Fsuyouquan%2FSQLSetupTools%2Fmaster%2FFixMissingMSI%2FFindSQLInstalls.vbs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ein%20this%20link%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E2)%20Select%20all%20of%20the%20contents%20on%20this%20page%2C%20copy%2C%20and%20paste%20it%20to%20a%20text%20file.%20Save%20the%20text%20file%20as%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3EFindSQLInstalls.vbs%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3E3)%20Open%20an%20elevated%20command%20prompt%20to%20the%20directory%20to%20which%20you%20saved%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EFindSQLInstalls.vbs%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efile%2C%20and%20run%20the%20command%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3ECscript%20FindSQLInstalls.vbs%20%25computername%25_sql_install_details.txt%3C%2FCODE%3E.%3C%2FP%3E%0A%3CP%3E4)%20Open%20the%20file%20output%20from%20Step%203%2C%20and%20search%20for%20your%20issued%20MSI%2FMSP%20file's%20actual%20cached%20name%20on%20your%20server.%20Then%2C%20you%20will%20get%20its%20registry%20key%20record%20result%20as%20scanned%20by%20this%20script.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%206%3A%3C%2FSTRONG%3E%20%3CFONT%20color%3D%22%230000FF%22%3EOnce%20you%20get%20the%20information%20in%20step%205%2C%20download%20the%20SQL%20patch%20package%20and%20then%2C%20you%20will%20need%20to%20extract%20the%20package%20directly.%20Once%20you%20get%20the%20healthy%20copy%20of%20the%20file%2C%20rename%20it%20to%20its%20cached%20name%20as%20you%20find%20on%20the%20component's%20log%20and%20replace%20the%20corrupted%20one%20with%20this%20new%20copy%20in%20the%20Windows%20Cache%20folder.%20You%20can%20use%20below%20script%20to%20extract%20your%20SQL%20patch%20package.%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Times%20New%20Roman'%3B%20font-size%3A%2012.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E1)%20Download%20the%20target%20SQL%20patch%20package%20from%20%3CA%20href%3D%22https%3A%2F%2Fwww.catalog.update.microsoft.com%2Fsearch.aspx%3Fq%3Dsql%2520server%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft%20Catalog%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Times%20New%20Roman'%3B%20font-size%3A%2012.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E2)%20Open%20an%20elevated%20CMD%20window%20and%20change%20the%20directory%20to%20the%20path%20where%20you%20have%20stored%20the%20downloaded%20package%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23008000%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Times%20New%20Roman'%3B%20font-size%3A%2012pt%3B%20font-style%3A%20normal%3B%22%3Epushd%20C%3A%5Ctemp%5Cpackage%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Times%20New%20Roman'%3B%20font-size%3A%2012.0pt%3B%22%3E3)%20Run%20the%20same%20command%20for%20each%20%E2%80%9C.exe%E2%80%9D%20file%20in%20the%20package%20to%20extract%20installation%20files%20into%20the%20same%20destination%20path%20(the%20new%20folder%20created%20in%20step%202)%20by%20%3CU%3E%3CSTRONG%3Echanging%20the%20file%20name%3C%2FSTRONG%3E%3C%2FU%3E%20and%20the%20%3CU%3E%3CSTRONG%3Edestination%20path%3C%2FSTRONG%3E%3C%2FU%3E%20in%20below%20script.%26nbsp%3B%3CSPAN%20style%3D%22font-family%3A%20'Times%20New%20Roman'%3B%20font-size%3A%2012.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3EEach%20time%20you%20execute%20the%20command%2C%20%3CSTRONG%3Ea%20pop%20up%20window%3C%2FSTRONG%3E%20may%20ask%20you%20to%3CSTRONG%3E%20specify%20the%20destination%20path.%20Please%20ensure%20it%20is%20the%20path%20specified.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.75in%3B%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23008000%22%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3ESQLServer2016SP1-KB3182545-x64-ENU.exe%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Times%20New%20Roman'%3B%20font-size%3A%2012.0pt%3B%22%3E%20%2Fs%20%2Fx%20%2Fb%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3EC%3A%5Ctemp%5Cyouroutputfoldername%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Times%20New%20Roman'%3B%20font-size%3A%2012.0pt%3B%22%3E%22%20%2Fv%22%2Fqn%22%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-family%3A%20'Times%20New%20Roman'%3B%20font-size%3A%2012.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22EstherXinMSFT_2-1636893263070.jpeg%22%20style%3D%22width%3A%20610px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F326938iF57646708D6B0F1E%2Fimage-dimensions%2F610x295%3Fv%3Dv2%22%20width%3D%22610%22%20height%3D%22295%22%20role%3D%22button%22%20title%3D%22EstherXinMSFT_2-1636893263070.jpeg%22%20alt%3D%22EstherXinMSFT_2-1636893263070.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%207%3A%3C%2FSTRONG%3E%20%3CFONT%20color%3D%22%230000FF%22%3EPerform%20the%20same%20check%20for%20all%20the%20SQL%20components%20that%20hit%20the%20exactly%20same%20exception%20and%20ensure%20the%20corrupted%20MSI%2FMSP%20files%20are%20replaced.%20Retry%20the%20patch%20installation.%20If%20you%20hit%20failure%20again%2C%20check%20the%20latest%20'Details.txt'%20log%20first%20and%20narrow%20down%20the%20new%20exception%20for%20next%20step%20of%20resolution.%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2963306%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESetup%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esql%202012%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESQL%202014%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esql%202016%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esql%202017%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESQL%202019%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Nov 14 2021 05:21 AM
Updated by: