如何将Sqlcmd连接到服务器? [英] How to connect Sqlcmd to the server?

查看:31
本文介绍了如何将Sqlcmd连接到服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 SQL Server 2008,我想使用命令编辑器来执行查询.

I just installed SQL Server 2008, and I wanted to use the command editor to execute queries.

为此,我打开了命令提示符,然后输入了

To do that I opened the command prompt, and I typed

Sqlcmd -S Serverinstance

但我收到一条错误消息:

but I got an error saying :

命名管道提供程序:无法打开与 SQL Server [53] 的连接.
Sqlcmd:错误:Microsoft SQL Server Native Client 10.0:建立与 SQL Server 的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.检查实例名称是否正确以及 SQL Server 是否配置为允许远程连接.有关详细信息,请参阅 SQL Server 联机丛书..
Sqlcmd:错误:Microsoft SQL Server Native Client 10.0:登录超时

我应该怎么做才能将它连接到服务器以便我可以继续?

What should I do to get it connected to the server so I can proceed?

谢谢:D.

推荐答案

(这个听起来很傻)我的问题是我没有使用大写的S"

(This one is going to sounds silly) my problem was that I wasn't using capital 'S'

例如:

C:\> SQLCMD -S localhost\sqlexpress

这篇关于如何将Sqlcmd连接到服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆