共用方式為


How can you configure CLR Enabled setting from the UI?

Someone asked me that question some weeks ago.

Back in 2005 you were able to enable/disable CLR integration from SAC’s GUI (SAC being Surface Area Configuration). Of course you could do it programmatically via sp_configure or via Microsoft.SqlServer.Management.Smo.Configuration.IsSqlClrEnabled property which is what SAC leveraged underneath.

Starting with 2008 SAC was removed and the justification for that decision is that what you could do from it was only a subset of what you can do now with PBM (PBM being Policy Based Management). You can now set CLR integration either through the Server Configuration or the Surface Area Configuration facets. Both of them expose a ClrIntegrationEnabled property. They both still leverage the IsSqlClrEnabled property mentioned above, which queries sys.configurations to get the current values and executes sp_configure to set them.

Thanks,

Nacho