当我尝试运行sqlcmd(从cmd提示符)时,我收到以下错误:
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 server,但sqlcmd无法连接.