Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable "clr strict security" in SQL Server

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.

like image 231
jakubiszon Avatar asked Feb 25 '20 13:02

jakubiszon


1 Answers

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.

like image 187
jakubiszon Avatar answered Nov 01 '22 12:11

jakubiszon