もう1度書いておきます。
SQLCLRのプロジェクトを作成して実行しても以下のようにメッセージが表示される場合は、SQLCLRが有効に成っていないので、有効にしてあげないといけません。
Execution of user code in the .NET Framework is disabled. Use sp_configure "clr enabled" to enable execution of user code in the .NET Framework.
実行するスクリプトは以下の通り
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO
現在有効かどうかを確認するには
select value
from sys.configurations
where name like 'clr enabled'
を実行する
BOL(SQL Server Books Online)では
SQL Server 2005 Books Online
- SQL Server Programming Reference
- Database Engine .NET Framework Programming
- Introduction to Common Language Runtime (CLR) Integration
- Enabling CLR Integration
に記述されている。