Thursday, May 14, 2009

Enabling CLR integration in SQL Server 2005

If you are working with SQL server CLR objects there’s a higher possibility that you might encounter the following error.

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

To overcome this, you have to reconfigure the SQL server to enable CLR objects. To do that, you can use the following commands.

exec sp_configure 'clr_enable','1'

RECONFIGURE

Note : CLR objects only works with SQL server 2005 and later versions.

CLR Objects Tutorial