Admin-Ahead Community

Windows => General Windows => Topic started by: lathu_official on January 13, 2014, 01:58:41 pm

Title: How to enable CLR Intgration SQL Server 2008
Post by: lathu_official on January 13, 2014, 01:58:41 pm
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]

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: [Select]

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 :

Quote
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..!!