尝试使用命令
从终端访问我的azure sql server时出现以下错误tsql -H 'myserver.database.windows.net' -U 'myuser' -P 'mypass'
错误:
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20017 (severity 9):
Unexpected EOF from the server
OS error 115, "Operation now in progress"
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
还尝试使用freetds.conf中的设置但是同样的错误
答案 0 :(得分:1)
您需要确保使用TDS version 7.4。确保tsql是最新的(你很可能必须download, build and install from sources),然后从env强制版本:
TDSVER=7.4 tsql -H 'myserver.database.windows.net' -U 'myuser' -P 'mypass'
答案 1 :(得分:0)
您也可以使用sqlcmd。
sqlcmd -S 'myserver.database.windows.net' -U 'myuser' -P 'mypass'
用于配置sqlcmd的网址:
https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-2017