以下是连接的出错信息:HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.我自己检查了,相关服务已经启动了,不知道是那里出了问题,大家遇到过类似问题吗?
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.我自己检查了,相关服务已经启动了,不知道是那里出了问题,大家遇到过类似问题吗?
不能使用IP地址,只能使用机器名;你安装了2个SQL时连接express版本时连接字符串的服务器位置改为“计算机名\express”