SQL CLR(Comman Language Runtime)
从SQL Server 2005开始,SQL开始集成了.NET Framework的CLR(Comman Language Runtime)组件,也就是说,现在我们可以使用任何.NET Framework语言(包括Microsoft Visual Basic .NET和Microsoft Visual C#)来编写存储过程、触发器、用户定义类型、用户定义函数(包括标量函数和表值函数)以及用户定义的聚合函数。
默认情况下SQL Server中CLR是关闭状态,若要启用CLR,需要使用sp_configure存储过程下的“clr enabled”选项:
启用CLR:
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'clr enabled', 1;
GO
RECONFIGURE;
GO
若要禁用CLR,把”clr enabled”项设为0即可。
参考资料: