Ruby 2.2.3 で tiny-tds gem を使用して Azure SQL データベースに接続しようとしています。インストールfreetds-dev
しfreetds-bin
たところ、すべてが正常に機能しているようです。
tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /etc/freetds
MS db-lib source compatibility: no
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes
そしてやっている
TDSVER=7.1 tsql -U xxxxx -P xxxxx -H mydatabase.database.windows.net -p 1433
うまく接続します(プロンプトが表示されます)。
tiny_tds gem をインストールしました:
/home/avril14th/.rvm/gems/ruby-2.2.3/gems/tiny_tds-0.7.0
そして接続しようとした
avril14th@avril14th:~/src/white2$ pry
[1] pry(main)> require 'tiny_tds'
=> true
[2] pry(main)> client = TinyTds::Client.new username: 'xxxx', password: 'xxxxx', host: 'xxxxx.database.windows.net', :azure => true
TinyTds::Error: Adaptive Server connection failed
tiny_tds github ページで説明されているように、パラメーターの他の多くの組み合わせを試しましたが、どれも機能しませんでした。
どんな助けでも大歓迎です。私はこれを5時間以上試しています...私を困惑させているのは、常に即座に失敗するため、タイムアウトの問題ではないということです.