24

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.

Community
  • 1
  • 1
jakubiszon
  • 3,229
  • 1
  • 27
  • 41
  • 3
    Did you enable the advanced options setting first? – Thom A Feb 25 '20 at 13:24
  • I also assume you aren't using SQL Server on Linux – Thom A Feb 25 '20 at 13:30
  • 1
    What version are you running? This is 2017+ setting. – SS_DBA Feb 25 '20 at 13:33
  • Yes, it is the latest dev edition "15.02070.41" running on 64bit windows 10 machine. – jakubiszon Feb 25 '20 at 13:35
  • 1
    "15.02070"? The latest version is 15.0.4013.40. We're not even on version 15.1 yet, let alone 15.2070. – Thom A Feb 25 '20 at 13:48
  • I missed the dot, it should be "15.0.2070.41" – jakubiszon Feb 25 '20 at 15:07
  • 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](https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/clr-strict-security) which states that this is an advanced option. Thanks :-) – Solomon Rutzky Feb 25 '20 at 15:47
  • Thanks for adding the error number and message. +1 – Solomon Rutzky Feb 25 '20 at 19:08

1 Answers1

54

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.

jakubiszon
  • 3,229
  • 1
  • 27
  • 41