Friday, December 12, 2008

Enable CLR in SQL Server

If you get try to run a CLR within a restore copy of a database that doesn't have it enabled you might run into the following message.

Msg 6263, Level 16, State 1, Line 1
Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option.



The easiest way to enable this is through T-SQL

sp_configure 'clr enabled', 1
GO
RECONFIGURE


This can also be done using the surface area configuration tool

No comments: