26

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.

8
  • 3
    Did you enable the advanced options setting first? Commented Feb 25, 2020 at 13:24
  • I also assume you aren't using SQL Server on Linux Commented Feb 25, 2020 at 13:30
  • 1
    What version are you running? This is 2017+ setting. Commented Feb 25, 2020 at 13:33
  • 1
    "15.02070"? The latest version is 15.0.4013.40. We're not even on version 15.1 yet, let alone 15.2070. Commented Feb 25, 2020 at 13:48
  • 1
    Hello jakubiszon. Can you please update the question with the exact error number (i.e. the "Msg XXXX ...") and maybe also the error text? When posting about errors in general, it's always best to include an error message or code given that there are so many different errors. This helps people find the answer to their particular error faster. And in this case, without the error info, you've really just duplicated the official documentation which states that this is an advanced option. Thanks :-) Commented Feb 25, 2020 at 15:47

1 Answer 1

61

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.

Sign up to request clarification or add additional context in comments.

5 Comments

Hi 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.
the second one makes the third one possible to run without throwing an exception
Sorry if I was unclear. I was being a bit literal in that the first two statements are the first EXEC and the first RECONFIGURE.
Worked for me on my sql14 instance, but for sql 19+ is no longer necessary
worked for SQL Server 15.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.