tsql登录失败,但管理工作室可以连接 [英] tsql login failed but management studio can connect
问题描述
我正在尝试使用tsql连接到MS SQL Server实例(排除无法连接到django-pymssql)
I'm trying to connect to a MS SQL Server instance using tsql (to troubleshoot not being able to connect with django-pymssql).
我可以连接好来自运行SQL Server管理工作室的VM的服务器(在Amazon RDS上运行的最新的SQL Server版本),但是从我的本机Ubuntu 15.10 env获取登录失败错误。
I can connect fine to the server (running on Amazon RDS, latest SQL Server version from on there) from a VM running SQL Server management studio, but from my native Ubuntu 15.10 env I get a login failed error.
使用以下内容:
tsql -H<主机名> -p 1433 -U<用户> -P< mypassword>
我得到:
locale是en_GB.UTF-8
locale charset是UTF-8
使用默认字符集UTF-8
消息18456(严重性14,状态1)来自EC2AMAZ-U1TAK71第1行:
用户sa登录失败。
错误20002(严重性9):
Adaptive Server连接失败
连接到服务器时出现问题
由于我可以使用相同的凭证在管理工作室中连接混合模式验证码,我怀疑这不是真正的错误。
As I can connect in management studio with mixed mode auth using the same creds I'm suspecting this isn't the real error.
任何人有什么想法可以解决问题吗?
Anyone have any ideas how I can troubleshoot?
tsql -C显示:
tsql -C shows:
编译时间设置(使用configure脚本建立)
版本:freetds v0.91
freetds.conf目录:/ etc / freetds
MS db-lib源兼容性:否
Sybase二进制兼容性:是
线程安全:是
iconv库:是
TDS版本:4.2
iODBC:否
unixodbc:是
SSPI信任登录:否
Kerberos:是
感谢加载任何指针!
(意外发布到AskUbuntu所以已经搬到这里对不起)
(Accidentally posted this to AskUbuntu so have moved here. Sorry).
推荐答案
回答我自己的问题。原来是由于密码太长了。我试了一下,任何超过30个字符的密码都不起作用。似乎是freetds的一个已知问题。
Answering my own question. Turns out it was down to the password being too long. I experimented with it, and any password longer than 30 characters didn't work. Seems to be a known issue with freetds.
谢谢。
这篇关于tsql登录失败,但管理工作室可以连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!