When applying patches on a SQL Server standalone instance in a cluster, you may encounter an error that prevents the patch from being installed successfully. One such error is the “Exception data is: System.IO.IOException” error. In this article, we will discuss how to fix this error and successfully install the patch.
Upon reviewing the Summary.txt file, you may come across the following error message:
Final result: The patch installer has failed to update the following instance: RTCLOCAL. To determine the reason for failure, review the log files. Exit code (Decimal): -2058616824
Further investigation in the Detail.txt file reveals the specific location of the failure:
‘C:\Windows\system32\hadrres.dll’. Exception data is: System.IO.IOException: The process cannot access the file ‘C:\Windows\system32\hadrres.dll’ because it is being used by another process.
The error indicates that the patch installer is unable to update the file ‘hadrres.dll’ in the ‘C:\Windows\system32’ directory because it is being used by another process.
To resolve this issue, you can follow the steps below:
- Stop any monitoring software related services that may be using the ‘hadrres.dll’ file.
- Rename the ‘hadrres.dll’ file in the ‘C:\Windows\system32’ directory to a different name.
- Attempt to apply the patch again.
By stopping the monitoring software services and renaming the ‘hadrres.dll’ file, you ensure that the file is not being used by any other process during the patch installation. After applying the patch, a new version of the ‘hadrres.dll’ file will be copied via the setup process.
It is important to note that incomplete patch installations can cause SQL Server to fail to start. Therefore, it is crucial to resolve any patch installation errors promptly to ensure the stability and functionality of your SQL Server instance.
In conclusion, if you encounter the “Exception data is: System.IO.IOException” error while applying patches to your SQL Server standalone instance in a cluster, follow the steps outlined in this article to fix the issue. By stopping monitoring software services and renaming the ‘hadrres.dll’ file, you can successfully install the patch and ensure the proper functioning of your SQL Server instance.