Applying a patch in SQL Server is a crucial process that many companies follow to ensure the stability and security of their database systems. However, sometimes errors can occur during the patch installation process, causing frustration and downtime for the organization.
In this article, we will discuss a common error related to the SQL Server patch installer and provide a solution to fix it.
The Error
One of our clients recently encountered an error while trying to apply a patch on their production server. They reached out to us for assistance as they were under pressure to minimize downtime. Upon investigating the issue, we found the following error message in the patch installer logs:
Instance SAPPROD overall summary: Final result: The patch installer has failed to update the shared features. 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.
The error code 1642 indicates that the Windows Installer service was unable to install the upgrade because the program to be upgraded may be missing or the upgrade may update a different version of the program.
The Solution
To resolve this issue, we followed the steps below:
- Open the Control Panel and navigate to “Programs and Features”.
- Locate “Microsoft SQL Server VSS Writer” in the list of installed programs.
- Right-click on “Microsoft SQL Server VSS Writer” and select “Repair”.
- During the repair process, we encountered a failure as the location it was pointing to did not contain the required file, “sqlwriter.msi”.
- We mounted the base media and browsed to the file location it was asking for.
- After successfully repairing the SQL Server VSS Writer, we re-applied the patch that was failing earlier.
- This time, the patch installation was successful.
- To verify the installation, we checked the installed updates in the Control Panel under “Programs and Features > View Installed Updates”.
- We confirmed that the hotfix related to the patch was installed.
It’s important to note that this solution may not work for all cases of the same error message. If the above steps do not resolve the issue, further research and troubleshooting may be required.
Conclusion:
When encountering errors during the SQL Server patch installation process, it is crucial to investigate the error logs and understand the specific error code. In this case, error code 1642 indicated a missing patch file for the SQL Server VSS Writer. By repairing the VSS Writer and re-applying the patch, we were able to successfully install the patch.
Remember to always backup your databases before applying any patches or updates to ensure data integrity and minimize the risk of data loss.