sql-server – 尝试运行sqlcmd失败,无法建立连接?

栏目: 数据库 · SQL Server · 发布时间: 5年前

内容简介:翻译自:https://stackoverflow.com/questions/4012526/trying-to-run-sqlcmd-fails-unable-to-establish-connection

当我尝试运行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无法连接.

尝试sqlcmd -S<InstanceName>

>只有将服务器安装为默认实例时,您的命令才有效.

>运行sp_helpserver以了解实例名称.

翻译自:https://stackoverflow.com/questions/4012526/trying-to-run-sqlcmd-fails-unable-to-establish-connection


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Introduction to Semi-Supervised Learning

Introduction to Semi-Supervised Learning

Xiaojin Zhu、Andrew B. Goldberg / Morgan and Claypool Publishers / 2009-6-29 / USD 40.00

Semi-supervised learning is a learning paradigm concerned with the study of how computers and natural systems such as humans learn in the presence of both labeled and unlabeled data. Traditionally, le......一起来看看 《Introduction to Semi-Supervised Learning》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

html转js在线工具
html转js在线工具

html转js在线工具