2017-08-23 7 views
1

朝!FreeTDS:接続しないでください

のコマンドを実行している間、私は問題を抱えている:

tsql -S "servername" - U "user" -P "password" 

私は、コマンドからの応答として取得:

There was a problem connecting to the server 

私はMS SQLサーバーに接続しようとしています。私はすでにドキュメントをチェックしましたが、私はまだこの問題を解決する方法を見つけていません。

私freetds.confは次のとおりです。

11:21:27.243084 22487 (util.c:141):logic error: cannot change query state from READING to WRITING 
11:21:27.243095 22487 (util.c:322):tdserror(0x6408e0, 0x13863b0, 20019, 0) 
11:21:27.243103 22487 (util.c:358):tdserror: client library not called because either tds_ctx (0x6408e0) or tds_ctx->err_handler is NULL 
11:21:27.243111 22487 (util.c:375):tdserror: returning TDS_INT_CANCEL(2) 
11:21:27.243118 22487 (util.c:165):Changed query state from READING to READING 
11:21:27.243132 22487 (util.c:165):Changed query state from READING to DEAD 
11:21:27.243140 22487 (util.c:322):tdserror(0x6408e0, 0x13863b0, 20017, 0) 
11:21:27.243148 22487 (util.c:358):tdserror: client library not called because either tds_ctx (0x6408e0) or tds_ctx->err_handler is NULL 
11:21:27.243156 22487 (util.c:375):tdserror: returning TDS_INT_CANCEL(2) 
11:21:27.243166 22487 (token.c:565):processing result tokens. marker is 0() 
11:21:27.243176 22487 (token.c:116):tds_process_default_tokens() marker is 0() 
11:21:27.243184 22487 (token.c:119):leaving tds_process_default_tokens() connection dead 
11:21:27.243191 22487 (util.c:83):logic error: cannot change query state from DEAD to PENDING 
11:21:27.243199 22487 (util.c:165):Changed query state from DEAD to DEAD 
11:21:27.243207 22487 (util.c:322):tdserror(0x6408e0, 0x13863b0, 20056, 9) 
11:21:27.243214 22487 (util.c:358):tdserror: client library not called because either tds_ctx (0x6408e0) or tds_ctx->err_handler is NULL 
11:21:27.243222 22487 (util.c:375):tdserror: returning TDS_INT_CANCEL(2) 
11:21:27.243229 22487 (util.c:322):tdserror(0x6408e0, 0x13863b0, 20017, 0) 
11:21:27.243238 22487 (util.c:358):tdserror: client library not called because either tds_ctx (0x6408e0) or tds_ctx->err_handler is NULL 
11:21:27.243253 22487 (util.c:375):tdserror: returning TDS_INT_CANCEL(2) 
11:21:27.243262 22487 (token.c:336):looking for login token, got 0() 
11:21:27.243269 22487 (token.c:116):tds_process_default_tokens() marker is 0() 
11:21:27.243277 22487 (token.c:119):leaving tds_process_default_tokens() connection dead 
11:21:27.243285 22487 (login.c:472):login packet accepted 
11:21:27.243292 22487 (util.c:322):tdserror(0x6408e0, 0x13863b0, 20002, 0) 
11:21:27.243300 22487 (util.c:358):tdserror: client library not called because either tds_ctx (0x6408e0) or tds_ctx->err_handler is NULL 
11:21:27.243307 22487 (util.c:375):tdserror: returning TDS_INT_CANCEL(2) 
11:21:27.243315 22487 (mem.c:648):tds_free_all_results() 

誰もがこの問題を解決する方法を知っています:

[global] 
    # TDS protocol version 
    tds version = 4.2 

    # Whether to write a TDSDUMP file for diagnostic purposes 
    # (setting this to /tmp is insecure on a multi-user system) 
    dump file = /tmp/freetds.log 
    debug flags = 0xffff 

    # Command and connection timeouts 
    timeout = 10 
    connect timeout = 10 

    # If you get out-of-memory errors, it may mean that your client 
    # is trying to allocate a huge buffer for a TEXT field. 
    # Try setting 'text size' to a more reasonable limit 
    text size = 64512 

# A typical Sybase server 
[egServer50] 
    host = symachine.domain.com 
     port = 5000 
     tds version = 5.0 

# A typical Microsoft server 
[egServer70] 
    host = ntmachine.domain.com 
     port = 1433 
     tds version = 7.0 

[SRVBD1] 
     host = 10.7.1.7   
     instance = SQL2008 
     port = 1434 
     tds version = 5.0 

はFreeTDSのは、私は次のエラーを注意してログファイルを確認しますか?

ありがとうございます!

+0

あなたの例では ' - U'(ダッシュとUの間のスペース)が表示されています。スペースを削除してみてください。あなたの質問を作成するときにそれが誤植ですか? 'tsql'はサーバ/ユーザ/パスワードを引用符で囲むと正常に動作しますか? – markp

答えて

0

構成がtds version = 5.0で、これはSQL Server 2008ではサポートされていません。代わりにtds version = 7.1を試すことができますか?また、ポート1434で、1433(デフォルト)ではありませんか?

問題が解決しない場合は、問題を解決するためにこの回答を修正しますが、これは最初のものです。

関連する問題