How to disable "clr strict security" in SQL Server

jakubiszon picture jakubiszon · Feb 25, 2020 · Viewed 9.3k times · Source

I enabled clr integration (i.e. SQLCLR) by running:

EXEC sp_configure 'clr enabled', 1;  
RECONFIGURE;  

Now when I try:

EXEC sp_configure 'clr strict security', 0;
RECONFIGURE;

I get an error saying the setting does not exist:

Msg 15123, Level 16, State 1, Procedure sp_configure, Line 62

The configuration option 'clr strict security' does not exist, or it may be an advanced option.

I know the proper solution to my problem is signing the assembly containing the stored procedures to allow it running with strict security but for now I need the quick and dirty fix.

Answer

jakubiszon picture jakubiszon · Feb 25, 2020

Enabling advanced options resolved my problem:

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;

EXEC sp_configure 'clr strict security', 0;
RECONFIGURE;

Now I can create assemblies.