无法连接到本地主机 SQL Server 2005
我刚刚在 Vista 上安装了 SQL Server 2005 SP2,并尝试连接到 Management Studio 中的对象资源管理器。这样做时,我收到以下错误:
无法连接到本地主机。
与网络相关或特定于实例的 建立时发生错误 连接到 SQL Server。服务器 未找到或无法访问。 验证实例名称是否为 正确并且 SQL Server 是 配置为允许远程 连接。 (提供者:命名管道 提供商,错误:40 - 无法打开 连接到 SQL Server)(微软 SQL Server,错误:2)
我正在使用以下凭据:
Server type: Database Engine; Server name: localhost; Authentication: Windows Authentication
我仅将 SQL Server 用于本地应用程序。我尝试使用 127.0.0.1,我的计算机名称“。”和本地主机。我已经搜索并尝试了我能找到的所有相关帮助主题。我已经重新安装、打开 IIS(只是猜测)、更新到最新的服务包、以管理员身份运行等等。
我在这里缺少什么?
杰杰
I just installed SQL Server 2005 SP2 on Vista and am attempting to connect to my object explorer in Management Studio. When doing so I get the following error:
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)
I am using the following credentials:
Server type: Database Engine; Server name: localhost; Authentication: Windows Authentication
I am just using SQL Server for a local application. I have tried using 127.0.0.1, my comp name, "." and localhost. I have searched and tried every relevant help topic I could find. I have reinstalled, turned on IIS (just a guess), updated to latest service packs all around, run as admin, etc.
What am I missing here?
JJ
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您是否运行了 Vista 的用户配置工具?请参阅 KB929907 登录到 SQL Server 2005 Express Edition 服务实例后,您可能无法执行大多数数据库操作基于 Windows Vista 的计算机上的 Pack 1
Did you run the User Provisioning Tool for Vista? See KB929907 You may be unable to perform most database operations after you log on to an instance of SQL Server 2005 Express Edition Service Pack 1 on a Windows Vista-based computer
尝试使用
(local)
另外,如果您有实例名称,则可以尝试
myComputerName\instanceName
Try using
(local)
Also if you have an instance name you can try
myComputerName\instanceName
您缺少实例名称。您不仅可以连接到
localhost
,还可以连接到以下任何一个(假设您的计算机名为dago
且您的实例为sqlexpress
):You're missing the instance name. You don't just connect to
localhost
, but to any of the following (assuming that your machine is calleddago
and your instancesqlexpress
):我没有使用快递。事实证明我安装了 SQL Server 的“客户端”版本。我什至不知道有客户端版本。我运行了完整安装并添加了 sa 用户,因为 Windows 身份验证对我不起作用(下一个目标)。我通过“localhost”(只是本地主机)连接,所以我不完全理解实例建议的全部内容。
基本上解决方案是安装完整版本。我的不好。轻松修复。
杰杰
I am not using express. It turns out I had a "client" version of SQL Server installed. I didn't even know there was a client version. I ran the full install and added the sa user as Windows Authentication wasn't working for me (next goal). I am connecting via "localhost" (just localhost), so I don't fully understand what the instance suggestion was all about.
Basically the solution was to get the full version installed. My bad. Easy fix.
JJ