sql-server – 尝试运行sqlcmd失败,无法建立连接?
栏目: 数据库 · SQL Server · 发布时间: 7年前
内容简介:翻译自: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
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
ACM国际大学生程序设计竞赛题解
赵端阳//袁鹤 / 电子工业 / 2010-7 / 39.00元
随着各大专院校参加ACM/ICPC热情的高涨,迫切需要有关介绍ACM国际大学生程序设计竞赛题解的书籍。《ACM国际大学生程序设计竞赛题解(2)》根据浙江大学在线题库的部分题目,经过分类、筛选、汇编,并进行了解答(个别特别简单或者特别复杂的题目未选择),比较详细地分析和深入浅出地讲解了解题的方法和用到的算法。题目的类型包括基础编程、模拟、字符串处理、搜索、动态规划、回溯、图论、几何和数学题。 ......一起来看看 《ACM国际大学生程序设计竞赛题解》 这本书的介绍吧!