Enable CLR Integration in SQL Server 2008

By default the common language runtime (CLR) integration feature is turned off. If it is turned off, SQL server won’t be able to access the custom assemlies that are part of your database (if the database contains objects that are coded to use CLR integration). CLRmust be enabled in order to use objects that are coded to use CLR integration.

To check :
Open SQL Management Studio, click on the “New Query” button. In the query window paste the following and click the “Execute” button :

Code: 
SELECT * FROM sys.configurations
WHERE name = 'clr enabled'

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

Execute the below query :

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

Then click the “Execute” button to run the stored procedure.

In the SQL Server “Messages” window you should see messages similar to below ones :

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.

That’s all..!!

About Sarath

A Techie from Kochi, India with 8+ years of experience in Linux and Windows server administration. I learn new things almost everyday and I enjoy the fun of learning and sharing my knowledge.

Related Posts

COMMENTS

Leave a Reply

Your email address will not be published. Required fields are marked *