How to Enable CLR Integration in SQL Server 2008

by Updated January 21, 2010

I recently installed SQL Server 2008 database on my local computer and forgot to enable the common language runtime (CLR).  Because I had forgotten to turn it on, some portions of my sites were not fuctioning properly due SQL Server not being able to access the custom assemlies that are part of my db's.  By default the common language runtime (CLR) integration feature is turned off, and must be enabled in order to use objects that are coded to use CLR integration. 

To enable CLR integration, use the clr enabled option of the sp_configure stored procedure:

  1. Open SQL Server Management Studio
  2. Click on the "New Query" button.
  3. In the query window paste in the following:
    sp_configure 'show advanced options', 1;
    sp_configure 'clr enabled', 1;
  4. Now click the "Execute" button to run the stored procedure and change your CLR settings in SQL Server.
  5. In the SQL Server "Messages" window you should see something similiar to:
    Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
    Configuration option 'clr enabled' changed from 0 to 1. Run the RECONFIGURE statement to install.
  6.  That's it!




1 Comment

anonymous by Vipasha on 3/20/2013
thank you very much really works..

Add your comment

by Anonymous - Already have an account? Login now!
Your Name:  

Enter the text you see in the image below
What do you see?
Can't read the image? View a new one.
Your comment will appear after being approved.

Related Posts

Here's one way to setup your connection string for a SQL Server 2008 Express database for a live website using ASP.NET on Windows Server 2008. Open "Sql Server Configuration Manager" -> the click on "SQL Server Network Configuration" -> then click...  more »

When using SQL Server 2008, you may receive a Save (Not Permitted Dialog) box pop-up when trying to save changes to an existing table. The dailog box reads: "Saving changes is not permitted. The changes you have made require the following tables to be...  more »