[freetds] tsql msg error 20009
tarek.atallah at tahadi.com
Sun Oct 25 04:57:57 EDT 2009
Hi very one,
I have installed tds , now I want to check the connection with sql
I tried tsql -S 'myip' -p 'myport' -U 'myuser' -P 'mypassword'
I keep getting this error
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
Senior Database Administrator
Tahadi Games - www.tahadi.com
Mobile +962 776555508
E-mail W : tarek.atallah at tahadi.com
E-mail P : tarek.atallah at gmail.com
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of
jklowden at schemamania.org
Sent: Friday, October 23, 2009 8:53 PM
To: FreeTDS Development Group
Subject: Re: [freetds] Ms sql backslash in named instance 2005
On Fri, Oct 23, 2009 at 06:56:00PM +0100, apk at blueyonder.co.uk wrote:
> thanks freedy and cedric for your quick response. Although that works, I'm
in a difficult situation where I need it to work as before. I won't go into
all the details but I have an existing app that not only uses freetds as its
intended but also parses it and uses it within an application. I can't alter
the app and need the functionality we have been using up to now.
> Do you know if the problem I have is a bug or a feature?
Maybe a little of both. I would say it's undesirable.
What's happening: tds_read_config_info() calls parse_server_name_for_port()
whose real purpose is to interpret instance\hostname and hostname:port
It's not supposed to interpret the [servername] string in freetds.conf,
but that's what it's doing.
If you set TDSDUMPCONFIG, you'll see near the top of the log it's looking
your 'server\name' name, and then another message, "Parsed servername, now
back on 0" that means it parsed for a port number and came up with zero.
I think the idea, once upon a time, was that
tsql -S 'instance\servername'
tsql -S 'servername:port'
would be a way to override the instance/port in freetds.conf. But I'm not
sure that's such a great feature and, even if it is, it belongs properly to
the tsql application, not libtds.
I would try deleting the call to parse_server_name_for_port() and see if
that solves your problem.
> -----Original Message-----
> From: Frediano Ziglio <freddy77 at gmail.com>
> Date: Fri 23 Oct 2009 18:08
> Il giorno ven, 23/10/2009 alle 17.46 +0100, apk at blueyonder.co.uk ha
> > Hi,
> > using freetds version 0.82 on solaris 10. tsql fails to connect to sql
server named instances as they contain backslashes. Ie.
> > tsql -S'hostname\instancename' -U joe -P bloggs
> > A work around is to remove the backslash in freetds.conf. However, this
worked fine in freetds 0.62.4.
> > The only error is
> > 'There was a problem connecting to the server'.
> > Its quite important that we maintain the exisiting functionality.
> > Has anyone else seen this and is there a solution that would avoid using
an unstable version?
> Try -H instead of -S
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
More information about the FreeTDS