以下是连接的出错信息: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.我自己检查了,相关服务已经启动了,不知道是那里出了问题,大家遇到过类似问题吗?

解决方案 »

  1.   

    补充: SQL Server是express版的,以前用惯2000了,这个版本的还不熟悉,想装回SQL Server2000,即一个机器上装两个SQL Server。听说,这样同时装两个SQL Server容易出错,是吗?
      

  2.   

    同时装两个SQL Server没事的啊,你是不是连接语句有问题啊
      

  3.   

    DQL2005的连接有点变化:
    不能使用IP地址,只能使用机器名;你安装了2个SQL时连接express版本时连接字符串的服务器位置改为“计算机名\express”
      

  4.   

    启动Configuration Manager,进入Network Configuration,可以看到TCP/IP默认是禁用的,然后启用它就OK了。