枚举 SQL Server 数据库时出现 SMO 异常

发布于 2024-09-26 18:24:47 字数 293 浏览 0 评论 0原文

在我的 C# 3.5 应用程序中,我使用 SMO 来定位正在运行的 SQL Server 实例。但是,在安装了 SQL Server 的干净计算机上,我收到以下异常:

Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException:无法检索此请求的数据。 ---> System.IO.FileNotFoundException:找不到程序集“Microsoft.SqlServer.SqlClrProvider,

我应该安装什么才能进行此程序集?SQL Server 已安装!

In my C# 3.5 application I am using SMO to locate runnin SQL Server instances. However, on a clean machine with SQL Server installed I receiving the following exception:

Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException: Failed to retrieve data for this request. ---> System.IO.FileNotFoundException: Could not find Assembly "Microsoft.SqlServer.SqlClrProvider,

What should I install to have this assemble? SQL Server is installed!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原野 2024-10-03 18:24:47

您没有提及 MSSQL 的版本或版本,但 SMO 组件通常与客户端工具一起安装,因此如果您使用的是 Express Edition,则可能根本不会安装它们。

这显然是一个常见问题(首次在 Google 上搜索“Microsoft.SqlServer.SqlClrProvider”):

http://social.msdn.microsoft.com/Forums/en-US/sqlnetfx/thread/1d2cb76b-642f-4067-9667-aacdbc142f74

SMO 组件可以在此处下载:

http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

You don't mention the version or edition of MSSQL, but the SMO components are normally installed with the Client Tools, so if you're using Express Edition then they may not be installed at all.

This is apparently a common issue (first hit on Google for "Microsoft.SqlServer.SqlClrProvider"):

http://social.msdn.microsoft.com/Forums/en-US/sqlnetfx/thread/1d2cb76b-642f-4067-9667-aacdbc142f74

The SMO components can be downloaded here:

http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文