How to disable "clr strict security" in SQL Server
19,076
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.
Author by
jakubiszon
Updated on June 19, 2022Comments
-
jakubiszon almost 2 years
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.
-
Solomon Rutzky about 4 yearsHi there. Just FYI: the first 2 statements (i.e. enabling "clr enabled") really has nothing to do with disabling "clr strict security", so should probably be removed. Thanks.
-
jakubiszon about 4 yearsthe second one makes the third one possible to run without throwing an exception
-
Solomon Rutzky about 4 yearsSorry if I was unclear. I was being a bit literal in that the first two statements are the first
EXEC
and the firstRECONFIGURE
. -
Solomon Rutzky about 4 yearsThanks for removing the non-relevant statements :)
-
Red over 3 yearsWorked for me on my sql14 instance, but for sql 19+ is no longer necessary
-
coder kemp about 2 yearsworked for SQL Server 15.0