我可以通过以下方式从我的 Ubuntu 20.04 VM 连接到我的 Azure SQL 数据库:
TDSVER=7.3 tsql -H mysubdomain.database.windows.net -U un -P pw -p 1433
我想用 freetds.conf 让它工作,但它失败了,我不知道为什么;这就是我正在尝试的:
tsql -S db_from_conf -U un -P pw
使用 freetds.conf 包含:
[db_from_conf]
host = mysubdomain.database.windows.net
port = 1433
tds version = 7.3
第二次调用失败:
Msg 40532 (severity 20, state 1) from db_from_conf:
"Cannot open server "db_from_conf" requested by the login. The login failed."
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
以下是“tsql -C”的结果:
Compile-time settings (established with the "configure" script)
Version: freetds v1.1.6
freetds.conf directory: /etc/freetds
MS db-lib source compatibility: no
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: auto
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes
OpenSSL: no
GnuTLS: yes
MARS: yes
这些有什么不同,我怎样才能让它工作?