Re: Support Host/Port In DBLIB

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Wed, 13 Apr 2011 09:55:23 +0200
Frediano Ziglio <[email protected]> wrote:

> There is also the "my_server\instance" syntax.

Yes.  The trouble is that nowadays Microsoft servers afaik no longer
default to port 1433.  Instead, they default to the "default instance"
whose port is discovered by querying 1434 for the instance
"MSSQLSERVER".  

A few years ago, TDS 7.0 + DNS + port 1433 would connect most of the
time.  Now, DNS + MSSQLSERVER is better.  

That give me an idea.  

If 
	freetds.conf & interface lookup fails
and	TDS version is 7+ (default or $TDSVER)
then	
	append "\\MSSQLSERVER" to the servername 
	someplace in config.c.  

as though that's what the user specified.  

> If we want to add many attributes even in dblib I think we should
> think about a standard way to add these. For this reason and cause the
> patch is about adding feature I personally won't put it in rc version.

Agreed.  Except all this name decorating (:port, \instance) is ad hoc
and not well supported.  Environment variables are the way to go.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.