Skip to Content.
Sympa Menu

freetds - Re: [freetds] sql 2005 connection question

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] sql 2005 connection question
  • Date: Tue, 20 Nov 2007 10:39:04 -0500

Matthijs Langenberg wrote:
> On Nov 20, 2007 3:05 AM, James K. Lowden <jklowden AT freetds.org> wrote:
>
> > Ryan Knopp wrote:
> > > Can freetds handle these type of mssql server strings?
> > >
> > > Server = <ip>\SQL2005
> > ...
> > > Server = 127.0.0.1\SQL2005
>
> This is the default way SQL2005 servers are identified aren't they? I
> got asked the same question a few days ago:"Now we are able to connect
> it to a MSSQL server, can u use the \SQL2005 notation to connect to our
> MSSQL2005 server?"

You can use use the servername\instancename notation, yes.

The OP's question was, "Can you use ipaddress\instancename?"

The name that comes before the '\' should be a section name in
freetds.conf, what the User Guide refers to as a "dataserver" name. That
gives FreeTDS a fighting chance, because it can look up the TDS protocol
version and anything else it needs to know about the server.

The most important properties in the server definition are:

1. hostname or ip address
2. port
3. TDS version

The hostname/address can be fetched from DNS, of course. and now the port
can be discovered by asking the server at a well-known port about the
instance's port. As of now, the mere fact that the instancename notation
was used tells us we have to use TDS 7.0 or 8.0 (or 9.0). But not which
one. And we shouldn't leave ignore the possibility that Sybase will enter
the fray.

We've started down the road of autodetecting the TDS version. If it can
be be made reliable, one day that will be the default. For now, though,
you're relying on the built-in TDS version. As long as the built-in isn't
5.0 -- the default if you don't configure otherwise -- I'd guess it will
work. But when the instance name support was added, the assumption was
that the servername would be found in freetds.conf.

HTH.

--jkl





Archive powered by MHonArc 2.6.24.

Top of Page