当我尝试SQLCMD运行(从命令提示符)我得到以下错误:试图运行sqlcmd失败,无法建立连接?
HResult 0x2, Level 16, State 1 Named Pipes Provider: Could not open a connection to SQL Server [2]. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in stance-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 i f SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.
不知道为什么出现这种情况?我可以从我的asp.net网站(本地运行,如数据库)连接到sql服务器,但sqlcmd无法连接。
您是否提供了凭据? – thomaux 2010-10-25 07:19:37
我该怎么做? – tweetypi 2010-10-25 08:41:51
您可以向我们展示您正在使用的SQLCMD参数吗? – 2010-10-25 09:07:16