2011-05-04 120 views
0

我刚在Vista上安装了SQL Server 2005 SP2,并试图连接到Management Studio中的对象资源管理器。这样做时,我得到以下错误:无法连接到本地主机SQL Server 2005

Cannot connect to localhost.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

我使用下列凭证:

Server type: Database Engine; Server name: localhost; Authentication: Windows Authentication 

我只是使用SQL Server的本地应用程序。我曾尝试使用127.0.0.1,我的comp名称“。”。和localhost。我已经搜索并尝试了所有我能找到的相关帮助主题。我已重新安装,打开IIS(只是猜测),更新到最新的服务包,作为管理员运行等。

我在这里错过了什么?

JJ

回答

0

我不使用快递。事实证明,我安装了一个“客户端”版本的SQL Server。我甚至不知道有客户端版本。我运行完整安装并添加了sa用户,因为Windows身份验证不适用于我(下一个目标)。我通过“本地主机”(localhost)连接,所以我不完全明白实例建议是什么。

基本上解决方案是要安装完整版本。我的错。轻松修复。

JJ

0

使用(local)

此外,如果有一个实例名称,你可以尝试myComputerName\instanceName

0

你错过实例名称尝试。你不只是连接到localhost,但有下列情形的(假设你的机器被称为dago和您的实例sqlexpress):

localhost\sqlexpress 
dago\sqlexpress 
.\sqlexpress 
+0

并非每个sql服务器实例都是一个命名实例。对于默认实例,您不使用您所指的语法。 – 2011-05-05 22:26:19

+0

现在我记得。 (目前不能访问Express以外的版本。)谢谢! – Lumi 2011-05-05 22:40:28

相关问题