开发者

SMO exception when enumerating SQL Server databases

开发者 https://www.devze.com 2023-01-19 06:09 出处:网络
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:

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.Fil开发者_开发技巧eNotFoundException: Could not find Assembly "Microsoft.SqlServer.SqlClrProvider,

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消