一工厂的SQL Server数据库服务器上的YourSQLDba_LogBackups作业做事务日志备份时,突然出现异常,异常的错误信息指向.NET Framework,出现这个问题时,一般我估计是该服务器自动应用了.NET Framework的一些补丁导致,因为以前也碰到过这类错误,于是去检查服务器,发现确实如此,具体请见下面截图
<Step>
<ctx>yMaint.backups</ctx>
<err>err :6522 A .NET Framework error occurred during execution of user-defined routine or aggregate "Clr_ExecAndLogAllMsgs":
System.BadImageFormatException: Bad IL range.
System.BadImageFormatException:
at System.Data.SqlServer.Internal.XvarWlobStream.GetSqlChars()
. In procedure Clr_ExecAndLogAllMsgs: at line 0</err>
</Step>
一般引起.NET Framework 6522的错误可能有下面一下原因:
· Corrupt download or incomplete installation of .NET Framework software.
· Corruption in Windows registry from a recent .NET Framework-related software change (install or uninstall).
· Virus or malware infection that has corrupted Windows system files or .NET Framework-related program files.
· Another program maliciously or mistakenly deleted .NET Framework-related files.
其实从上面截图看,是因为在自动应用补丁时,没有安装完成,需要重启服务器完成安装更新。Windows Update也提示要求重启完成更新。所以造成了YourSQLDba那边一些程序集异常,出现错误信息。