Microsoft SQL Server Enable CLR on database


Example

CLR procedures are not enabled by default. You need to run the following queries to enable CLR:

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'clr enabled', 1;
GO
RECONFIGURE;
GO

In addition, if some CLR module need external access, you should set TRUSTWORTHY property to ON in your database:

ALTER DATABASE MyDbWithClr SET TRUSTWORTHY ON