Click to Rate and Give Feedback
TechNet
TechNet Library
SQL Server
SQL Server 2008 R2
Database Engine
Operations
Managing Servers
 clr enabled Option
Community Content
In this section
Statistics Annotations (1)
Collapse All/Expand All Collapse All
Other versions are also available for the following:
clr enabled Option

Use the clr enabled option to specify whether user assemblies can be run by SQL Server. The clr enabled option provides the following values.

Value

Description

0

Assembly execution not allowed on SQL Server.

1

Assembly execution allowed on SQL Server.

WOW64 servers must be restarted before the changes to this setting will take effect. Restart is not required for other server types.

NoteNote

When RECONFIGURE is run and the run value of the clr enabled option is changed from 1 to 0, all application domains containing user assemblies are immediately unloaded.

NoteNote

Common language runtime (CLR) execution is not supported under lightweight pooling. Disable one of two options: "clr enabled" or "lightweight pooling. Features that rely upon CLR and that do not work properly in fiber mode include the hierarchy data type, replication, and Policy-Based Management.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Enable CLR Example      rsfields   |   Edit   |   Show History
--Check if CLR is enabled
select * from sys.configurations where name = 'clr enabled'

-- Turn advanced options on
EXEC sp_configure 'show advanced options' , '1';
GO
RECONFIGURE;
GO
-- Enable CLR
EXEC sp_configure 'clr enabled' , '1'
GO
RECONFIGURE;
GO
-- Turn advanced options back off
EXEC sp_configure 'show advanced options' , '0';
GO
RECONFIGURE;
GO

-- Determine database compatiblity level
exec sp_helpdb 'YourDatabaseName'

-- If compatibility_level less than 90
ALTER DATABASE YourDatabaseName SET SINGLE_USER
GO
EXEC sp_dbcmptlevel YourDatabaseName, 90;
GO
ALTER DATABASE YourDatabaseName SET MULTI_USER
GO
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker