Domanda

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.

È stato utile?

Soluzione

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).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top