sqlserver 2008 开启CLR

时间:2023-03-09 07:59:54
sqlserver 2008 开启CLR

Common language runtime (CLR) 特性支持在sql server中编写和执行.net的存储过程、触发器、和函数
但是要想执行CLR代码,首先要开启CLR特性

1.查看CLR特性是否开启

select * from sys.configurations where name='clr enabled';

  sqlserver 2008 开启CLR

value_in_use表明没有开启“clr enabled”

2.开启clr

--enable show advanced options
--if it's disable
sp_configure 'show advanced options',1
GO
RECONFIGURE
GO
sp_configure 'clr enabled',1
GO
RECONFIGURE
GO

3.查看结果

sqlserver 2008 开启CLR