SQL Server 网络接口:连接字符串无效 [87] [英] SQL Server Network Interfaces: Connection string is not valid [87]

查看:40
本文介绍了SQL Server 网络接口:连接字符串无效 [87]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在我的 SQL Server 2008 实例上从 cmd 运行它时:

When I am running this from cmd on my SQL Server 2008 instance:

sqlcmd -U sa -S mymachinen_name\MSSQLSERVER

(其中 MSSQLSERVER 是我的实例名称)

(where MSSQLSERVER is my instance name)

我提示输入密码,然后我得到这个:

I get prompt for password and after that I get this:

密码:

HResult 0x57,级别 16,状态 1 SQL Server 网络接口:连接字符串无效 [87].

HResult 0x57, Level 16, State 1 SQL Server Network Interfaces: Connection string is not valid [87].

Sqlcmd:错误:Microsoft SQL Server Native Client 10.0:建立与 SQL Server 的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.检查实例名称是否正确以及 SQL Server 是否配置为允许远程连接.有关详细信息,请参阅 SQL Server 联机丛书..

Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..

Sqlcmd:错误:Microsoft SQL Server Native Client 10.0:登录超时已过期.

Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.

我已经启动了 SQL Server 浏览器服务,而且我可以使用 Windows 身份验证通过 Management Studio 登录.

I have my SQL Server browser service started and also I can login through Management Studio with Windows authentication.

还发现了这篇知识库文章,但这是针对 SQL Server 2005/2000 的.>

Also found this KB article, but this is for SQL Server 2005/2000.

推荐答案

通常,MSSQLSERVER 服务是一个未命名的默认实例的服务.

Typically, the MSSQLSERVER service is the service of a un-named default instance.

因此,试试这个:

sqlcmd -U sa -S mymachine_name

(不指定任何实例名称 - 只是机器名称)

这篇关于SQL Server 网络接口:连接字符串无效 [87]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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