Skip to Content.
Sympa Menu

freetds - Re: [freetds] unixODBC+freeTDS: DSN-less connections with defaults

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "O'Brien, Jason K" <Jason.Obrien AT constellation.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] unixODBC+freeTDS: DSN-less connections with defaults
  • Date: Mon, 8 Oct 2012 14:10:43 -0400

2012/10/8 James K. Lowden <jklowden AT freetds.org>:
> On Mon, 8 Oct 2012 12:09:45 -0400
> "O'Brien, Jason K" <Jason.Obrien AT constellation.com> wrote:
>
...
>> Is there any way to set the default port with the freetds odbc driver?
>
> Congratulations, your assessment is accurate. :-/
>
> Your shortest path from where you sit may be to set TDSPORT in the
> environment.
>
> The second option is to connect to a named instance, even the
> default, MSSQLSERVER. That should get the port from port 1434 via
> UDP if your server is so configured. Or you could include the port
> in your connection string.

Thanks, I'll look into these. Setting TDSPORT seems very workable.

> I don't see much point in creating a configurable default, certainly
> not compiled in, and probably not in a config file. A default
> protocol makes sense because most sites (I'd say) use either Sybase
> or Mircrosoft, not both, and hence save themselves some setup for
> the typical connection. OTOH it's relatively rare that all or even
> most servers at a site use the same port, unless it's the vendor's
> default port.

Agreed, I doubt there's many DBAs with a 'favorite port' running around :)
However, as you say, it would be nice to be able to set the default protocol
and at least the default port for Sybase/MS, if only to match the vendor's
ODBC drivers. Nothing show stopping though, this project has saved us a lot
of trouble, and even if I end up modifying/duplicating legacy connection
strings, I'm certainly grateful.

Is there a distinct reason freetds.conf isn't loaded in this case, or is it
just assumed they will also be conf-less?

>>> This e-mail and any attachments are confidential, may contain legal,
>>> professional or other privileged information, and are intended solely for
>>> the addressee. If you are not the intended recipient, do not use the
>>> information in this e-mail in any way, delete this e-mail and notify the
>>> sender. -IP1





Archive powered by MHonArc 2.6.24.

Top of Page