I am using freetds version 1.00.91 from HomeBrew. I can successfully connect when I bypass the freetds.conf
, e.g. using the following command
tsql -H {my_hostname} -p {port_no} -U {username} -P {password}
However, when I tried to
tsql -S MYMSSERVER -U {username} -P {password}
it failed with the following error:
Msg 40532 (severity 20, state 1) from MYSERVER:
Cannot open server "MYSERVER" requested by the login. The login failed.Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
The freetds.conf
content is the following:
[MYSERVER]
host = {my_hostname}
port = {port_no}
tds version = 7.3
I checked the output of tsql -C
and confirmed that 7.3 is also the version used by the -H -p
command.
Here's some relevant info from freetds.log
file about this error:
15:49:43.391174 3380 (token.c:313):looking for login token, got aa(ERROR)
15:49:43.391215 3380 (token.c:132):tds_process_default_tokens() marker is aa(ERROR)
15:49:43.391240 3380 (mem.c:653):tds_free_all_results()
15:49:43.391258 3380 (token.c:2384):tds_process_info() reading message 40532 from server
15:49:43.391308 3380 (token.c:2456):tds_process_info() calling client msg handler
15:49:43.391391 3380 (token.c:2473):tds_process_info() returning TDS_SUCCESS
15:49:43.391418 3380 (token.c:313):looking for login token, got fd(DONE)
15:49:43.391442 3380 (token.c:132):tds_process_default_tokens() marker is fd(DONE)
15:49:43.391471 3380 (token.c:2082):tds_process_end: more_results = 0
Thanks for all that help!