Re: unixODBC+freeTDS: DSN-less connections with defaults
"O'Brien, Jason K" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <8FB99964BA0BCE478ED6A990EA33DBA80273CF8C31E8@EXM-MSW-07.Ceg.Corp.Net> |
2012/10/8 James K. Lowden <[email protected]>: > On Mon, 8 Oct 2012 12:09:45 -0400 > "O'Brien, Jason K" <[email protected]> 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