freeTDS on Linux and Azure database, login issue

只愿长相守 提交于 2020-01-15 23:02:35

问题


I try to connect to Azure database like:

 tsql -H XXXXXX.database.windows.net -p 1433 -U mycorrectusername

but I got message

Msg 20004, Level 9, State 0, Server OpenClient, Line 0
Read from SQL server failed.
Msg 20014, Level 9, State 0, Server OpenClient, Line 0
Login incorrect.
There was a problem connecting to the server

It is possible that I cant login because I have to choose database first. I have to, when I log in via website.

When I try to choose database like:

tsql -H XXXXXXXXX.database.windows.net -p 1433 -U username -D databasename

but I get message:

tsql: illegal option -- D

Here is tsql configuration:

[~]$ tsql -C
Compile-time settings (established with the "configure" script):
                       Version: freetds v0.64
MS db-lib source compatibility: yes
   Sybase binary compatibility: unknown
                 Thread safety: yes
                 iconv library: yes
                   TDS version: 5.0
                         iODBC: no
                      unixodbc: no

Thank you for any suggestions.


回答1:


It is not possible to connect with Azure database with FreeTDS v0.64. The solution is to compile the newest freetds version, currently 0.91. The sources are avalible here:

https://gitorious.org/freetds/freetds/source/a6898bdd6fa115447366ddbc76830e6826ea5d21:

and compile it with ms dblib source compatibility option (and tls or openssl for the encrypted connection).



来源:https://stackoverflow.com/questions/19845687/freetds-on-linux-and-azure-database-login-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!