Enabling CLR allows the creation of CLR functions, stored procedures, triggers, user-defined aggregates and user-defined types.
SELECT name,       CAST(value as int) as value_configured,       CAST(value_in_use as int) as value_in_use FROM sys.configurations WHERE name = 'clr enabled';Both value columns will show 0 if CLR is disabled.
To check if CLR assemblies are in use...
USE [<database_name>]GO SELECT name AS Assembly_Name, permission_set_desc FROM sys.assemblies WHERE is_user_defined = 1; GOTo check if Permission is set to SAFE_ACCESS...
SELECT name,        permission_set_desc FROM sys.assemblies WHERE is_user_defined = 1;To set assemblies to SAFE use this code:
ALTER ASSEMBLY WITH PERMISSION_SET = SAFE; Be aware that an alternate value is likely to have been set purposefully, so this change carries a risk that the assembly may cease to function as intended.
EXECUTE sp_configure 'clr enabled', 0; RECONFIGURE;