Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server: How to check if CLR is enabled?

SQL Server 2008 - What is an easy way to check if clr is enabled?

like image 584
magnattic Avatar asked Jan 26 '11 13:01

magnattic


People also ask

How do I know if SQL Server is CLR enabled?

To determine if CLR is enabled, execute the following commands: EXEC SP_CONFIGURE 'show advanced options', '1'; RECONFIGURE WITH OVERRIDE; EXEC SP_CONFIGURE 'clr enabled';

How do I know if CLR is installed?

If CLR is enabled the value returned will be '1', as displayed in the 'value' row. By default this feature is turned off and the value would be '0'. To disable CLR, set the clr enabled option to '0'.

Is CLR enabled by default?

clr strict security is enabled by default, and treats SAFE and EXTERNAL_ACCESS assemblies as if they were marked UNSAFE . The clr strict security option can be disabled for backward compatibility, but this is not recommended.

How do I test a SQL CLR function?

Right-click on a line of code in the text editor on the function or routine that you want to debug. Select Breakpoint, Insert Breakpoint. The breakpoint is added, highlighting the line of code in red. In the Debug menu, select Start Debugging to compile, deploy, and test the project.


2 Answers

SELECT * FROM sys.configurations WHERE name = 'clr enabled' 
like image 186
Jason Avatar answered Sep 21 '22 09:09

Jason


Check the config_value in the results of sp_configure

You can enable CLR by running the following:

sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'clr enabled', 1; GO RECONFIGURE; GO 

MSDN Article on enabling CLR

MSDN Article on sp_configure

like image 24
codingbadger Avatar answered Sep 20 '22 09:09

codingbadger