无法打开SQL Server 2005数据库? [英] Can't open SQL Server 2005 database ?

查看:89
本文介绍了无法打开SQL Server 2005数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已设置 VS 2008 SP1 ,正在使用 此外, 我先安装了VS 2008,将它放在SQL Compact中.然后安装SQL 2005 Development.我在遇到以下错误消息时遇到了问题-因此我卸载了SQL Compact和SQL 2005. 全新安装带有SP2的SQL 2005 Developer的安装-仍然出现错误.

在使用服务器资源管理器选择服务器,然后选择在该服务器上运行的数据库打开它后,出现错误. VS 2008让我可以在那时测试数据库连接-确实可以.但是,当我尝试添加数据库时,它说-

可以 无法加载文件或程序集Microsoft.SqlServer.Management.Sdk.Sfc, 版本= 10.0.0,0,文化=中性,...或其依赖项之一 系统找不到指定的文件.

据我所知,指定的文件是 Microsoft.SqlServer.Smo.dll . 我的副本的当前版本为 9.0.242.0 ,位于 SQL Server文件.这也是我的注册表中保存的版本号.我认为10.0.0.0是SQL 2008中的版本,但我尚未安装.

我的理解也是VS使用 System.data.dll 打开SQL数据库.我正在运行 .net 2.0.50727 ,而System.data.dll是 2.0.50727.3031(netfxsp 050727-3000)-,并且没有其他System.data.在计算机上的dll

无论是通过VS 2008还是使用SSMS使用创建数据库"创建数据库的,都会发生这种情况.而且我可以在SSMS或VS 2005中打开数据库.

我是否拥有正确版本的System.data.dll-或是否存在其他可能不兼容的版本图书馆?还是有其他想法?

谢谢

I have set up VS 2008 SP1 and am using SQL 2005 SP2.   Also, I installed VS 2008 first, which puts in SQL Compact. And then install SQL 2005 Development.  I was having problems with the error message below - so I uninstalled SQL Compact and SQL 2005. And then did a clean install of SQL 2005 Developer with SP2 - and still get the error.

I get the error after using the server explorer to select the server and then the database that's running on that server to open it. VS 2008 lets me test the database connection at that point - which does work.  But then when I try to add the database it says -

Could not load file or assembly Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0,0, Culture=neutral, ...or one of its dependencies The system cannot find the file specified.

So far as I can see the specified file is Microsoft.SqlServer.Smo.dll.  My copy of this has a current version of 9.0.242.0 and sits within the SQL Server files. That is also the version number held in my registry.  I think 10.0.0.0 is the version in SQL 2008 but I haven't installed that.

My understanding is also that VS uses System.data.dll to open the SQL database.  I am running to .net 2.0.50727 and the System.data.dll is 2.0.50727.3031 (netfxsp 050727-3000) - and there is no other System.data.dll on the computer

This happens whether the database was created using Create Database through VS 2008 or SSMS.  And I can open the database in SSMS or VS 2005.

Have I got the right version of System.data.dll - or are there any other possibly incompatible libraries?  Or any other ideas?

Thanks

推荐答案

 

这是解决方法:

从2008年6月的Microsoft SQL Server 2008功能包RC0安装以下内容-

Install the following from Microsoft SQL Server 2008 Feature Pack RC0, June 2008 -

SQLSysClrTypes

SQLSysClrTypes

SharedManagementObjects

SharedManagementObjects

sqlncli10

sqlncli10

可以从以下网站下载这些功能: http://www.microsoft.com/downloads/details.aspx?FamilyId=089A9DAD-E2DF-43E9-9CD8-C06320520B40&displaylang=zh-CN

These features can be downloaded from: http://www.microsoft.com/downloads/details.aspx?FamilyId=089A9DAD-E2DF-43E9-9CD8-C06320520B40&displaylang=en


这篇关于无法打开SQL Server 2005数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆