[freetds] connecting to MSSQL 2005
James K. Lowden
jklowden at freetds.org
Sun Sep 7 12:14:49 EDT 2008
Jeremy Kister wrote:
> On 9/6/2008 11:27 PM, Jeremy Kister wrote:
> > I'm having a difficult time connecting to a mssql 2005 server.
>
> tsql reports:
> # tsql -S server -U dbun -P dbpw
> locale is "C"
> locale charset is "646"
> Msg 20009, Level 9, State -1, Server OpenClient, Line -1
> Unable to connect: Adaptive Server is unavailable or does not exist
> There was a problem connecting to the server
Message 20009 indicates connect(2) failed. Either the server couldn't be
found, or it didn't respond to a connection request on the specified port.
I would use TDSDUMP to see the details of the connection attempt. If that
isn't enough, use TDSDUMPCONFIG to see how the servername is being
resolved to an IP address.
Also, you can bypass the whole lookup mechanism with:
$ TDSVER=7.0 tsql -H host -p port -U user -P passwd
HTH.
--jkl
More information about the FreeTDS
mailing list