Failed to initialize the Common Language Runtime

今天在SQL Server 2008中执行存储过程的时候报以下错误:

Msg 6513, Level 16, State 27, Procedure usp_QueryRealTimeRoomInfo, Line 173
Failed to initialize the Common Language Runtime (CLR) v2.0.50727 due to memory pressure. 
This is probably due to memory pressure in the MemToLeave region of memory. For more information, see the CLR integration documentation in SQL Server Books Online.

解决方法:

出现这个错误的应该都是32位的SQLServer,所以第一步要查看SQL Server是否32位,可以通过查看Windows进程的方式知道你安装的SQLServer是否32位

因为我们是使用32位的SQLServer,所以对内存的使用会有些限制,所以下一步在SQLServer实例的属性中设置一下

 然后找到sqlserver configuration manager设置一下启动参数

经过以上的设置就可以正常使用了

参考文献:

http://blog.sql-assistance.com/index.php/failed-to-initialize-the-common-1

http://support.microsoft.com/kb/2003681

http://support.microsoft.com/default.aspx?scid=kb;EN-US;969962

原文地址:https://www.cnblogs.com/waynechan/p/6008824.html