[freetds] Unable to connect: Adaptive Server is unavailable or does not exist

Krish krishna.sunuwar at gmail.com
Mon May 6 05:53:08 EDT 2013


While trying to connect remote SQL Server:

$tsql -S localhost -U myuser

I got error like:

locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20009 (severity 9):
    Unable to connect: Adaptive Server is unavailable or does not exist
    OS error 61, "Connection refused"
There was a problem connecting to the server

The output of $tsql -C is as below:

Compile-time settings (established with the "configure" script)
                        Version: freetds v0.91
         freetds.conf directory: /usr/local/freetds/conf/freetds
 MS db-lib source compatibility: no
    Sybase binary compatibility: no
                  Thread safety: yes
                  iconv library: no
                    TDS version: 5.0
                          iODBC: no
                       unixodbc: no
          SSPI "trusted" logins: no
                       Kerberos: no

I have created tunnel for remote server like:

$ssh -L 1433:db_server:1433 user at mid_server

This forward the local port 1433 to db_server. I tested. My ssh tunnel
works because I can connect to database using Navicat (localhost on
1433). I can telnet localhsot 1433.



------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity
to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of, or taking of any action in reliance upon, this
information by person or entity other than the intended recipient is
not permitted. If you received this in error, please contact the
sender and delete the material from any computer.


More information about the FreeTDS mailing list