SQL Server 2008 clr 集成

SQL Server 2008 clr integration

我正在开发一个项目,创建一个 CLR Integration.When 将 dll 文件加载到 SQL 服务器,它打印错误。

加载命令:CREATE ASSEMBLY WcfApp from 'G:\WcfAppTest.dll'.

错误是:找不到system.runtime.serialization

WcfAppTest.dll 也是一个 WCF 客户端,我想在 PROCEDURE 中向 WCF Server 发送一些消息。

你能给我一个句柄吗?

记录了 supported assembblies 的列表:

CustomMarshalers
Microsoft.VisualBasic
Microsoft.VisualC
mscorlib
System
System.Configuration
System.Data
System.Data.OracleClient
System.Data.SqlXml
System.Deployment
System.Security
System.Transactions
System.Web.Services
System.Xml
System.Core.dll
System.Xml.Linq.dll

基于 WCF 的程序集是 not supported:

An untested .NET Framework assembly may exit its host process when a critical condition such as low-memory condition occurs. You can use the assembly in the SQL Server CLR-hosted environment at your own risk. However, Microsoft SQL Server Customer Support Services (CSS) will not help you to use and troubleshoot issues that are associated with an unsupported .NET Framework assembly.

我建议您在应用程序中从外部 SQL 进行 WCF 调用。这是比使用 SQLCRL 更好的解决方案的原因有很多。