Microsoft SQL Server Common Language Runtime Integration Enable CLR on database

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

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


Got any Microsoft SQL Server Question?