Applying a patch in SQL Server is a planned process which is followed across various companies. Most of the companies take time to apply the patch to make sure the stability of the patch can be validated. Let us see an error related to patch installer.
One of the client was trying to apply the patch on production and was under tremendous pressure due to the small amount of allocated downtime. They didn’t waste much time and contacted me to see what I can offer in a short amount of time.
Since it was urgent, I quickly join GoToMeeting and looked at the logs of failure.
Instance SAPPROD overall summary:
Final result: The patch installer has failed to update the shared features. To determine the reason for failure, review the log files.
Exit code (Decimal): -2068052374
Exit facility code: 1212
Exit error code: 1642
Exit message: The patch installer has failed to update the shared features. To determine the reason for failure, review the log files.
Start time: 2017-06-29 17:14:46
End time: 2017-06-29 17:15:20
Requested action: Patch
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20170629_171254\SAPPROD\SqlWriter_Cpu64_1.log
To decode 1642, I have used NET command.
Here is the text of the message shown in the above image.
The upgrade cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade.
MSI (s) (C8:78) [17:15:18:787]: Windows Installer installed an update. Product Name: Microsoft SQL Server VSS Writer. Product Version: 10.50.1600.1. Product Language: 1033. Manufacturer: Microsoft Corporation. Update Name: {8B9F68F5-8191-4F48-B6C5-4A98858642AF}. Installation success or error status: 1642.
MSI (s) (C8:78) [17:15:18:787]: Note: 1: 1708
MSI (s) (C8:78) [17:15:18:787]: Product: Microsoft SQL Server VSS Writer — Installation failed.
MSI (s) (C8:78) [17:15:18:787]: Windows Installer installed the product. Product Name: Microsoft SQL Server VSS Writer. Product Version: 10.50.1600.1. Product Language: 1033. Manufacturer: Microsoft Corporation. Installation success or error status: 1642.
Above lines also tell error 1642. So, we are sure that this is due to some missing patch files.
SOLUTION/WORKAROUND
In above logs, we know that issue is with “Microsoft SQL Server VSS Writer” so I went to Control Panel > Programs and Features > Microsoft SQL Server VSS Writer > right click > Repair. It failed as the location to where it was pointing did not show and sqlwriter.msi. We mounted base media and browsed to the file which it was asking for.
Using above trick, we successfully repaired the SQL Server VSS Writer. After this we applied the same patch which was failing earlier. This time, it was successful. We went to Control Panel > Programs and Features > View Installed Updates > in the updates for Microsoft SQL Server found that this hotfix was installed.
There might be other reasons of same error message, but in my case above worked. So you may want to search more on internet if the above trick doesn’t fix the issue.
Reference: Pinal Dave (https://blog.sqlauthority.com)
First appeared on SQL SERVER – The Patch Installer has Failed to Update the Shared Features