SQLCMD命令的开关是否区分大小写? [英] Are the switches for SQLCMD command case-sensitive?

查看:130
本文介绍了SQLCMD命令的开关是否区分大小写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在两台计算机上安装了SQL Server 2014 Management Studio,这两台计算机都在Windows 10上运行.SQLCMD命令的开关在一台计算机上区分大小写,但在另一台计算机上不是。如果我用小写开关键入命令(如下面的例子中的
),它可以在一个上工作但在另一个上不起作用。
$
sqlcmd -s。\< servername> ;
$
sqlcmd -l 

对于第二台计算机,我必须输入大写字母,如下所示。

sqlcmd -S。 \\< servername>

sqlcmd -L



决定这个的问题/设置是什么?

解决方案

Hi Susmith,


虽然我不知道答案,但它可能是每台服务器上的实例级排序规则。 &NBSP;你可以检查每个服务器上的排序规则:



SELECT
SERVERPROPERTY 'COLLATION'


I have SQL Server 2014 Management Studio installed on two computers, both of which run on Windows 10. The switches for SQLCMD command are case-sensitive on one computer, but it is not on the other one. If I type the command with lower case switches (like the below examples), it works on one but doesn't work on the other.
sqlcmd -s .\<servername>
sqlcmd -l 
For the second computer, I have to type with upper case as shown below.
sqlcmd -S .\<servername>
sqlcmd -L

What is the issue/setting that decides this?

解决方案

Hi Susmith,

Although I dont know the answer to this, it may be the instance level collation on each server.  Can you check the collation on each server with:

SELECT SERVERPROPERTY('COLLATION')


这篇关于SQLCMD命令的开关是否区分大小写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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