27. June 2009 21:43
I was working on the User Defined Data Types in SQL Server 2005 example from SQLServerCental.com and run in to the following errors:
Msg 6263, Level 16, State 1, Line 1
Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option.
Problem: By default the CLR is disabled in SQL Server 2005. Below are some guidelines on how to enable it
1. Explore "SQL Server 2005/Configuration Tools/SQL Server Surface Area Configuration"
2. Select "Surface Area Configuration for Features"
3. Click on CLR Integration
4. Check the "Enable CLR Integration" Checkbox
OR (Tips and Tricks for: SQL Server)
EXEC sp_configure 'show advanced options' , '1';
EXEC sp_configure 'clr enabled' , '1'
-- Turn advanced options back off
EXEC sp_configure 'show advanced options' , '0';