I can connect from my Ubuntu 20.04 VM to my Azure SQL database with:
TDSVER=7.3 tsql -H mysubdomain.database.windows.net -U un -P pw -p 1433
I want to get this working with freetds.conf, but it's failing, and I'm not sure why; here's what I'm trying:
tsql -S db_from_conf -U un -P pw
With freetds.conf containing:
[db_from_conf]
host = mysubdomain.database.windows.net
port = 1433
tds version = 7.3
The 2nd call fails with:
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
Here are the results for '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
How are these different, and how can I get this working?