[freetds] ASA 7 Cannot Connect - Please Help!

Lowden, James K LowdenJK at bernstein.com
Tue Apr 27 15:23:56 EDT 2004

> From: Perren Smith [mailto:perren at uoregon.edu]
> Sent: April 27, 2004 1:49 PM
> I guess I should have clarified:
> >From the log file that I created using dbisql.exe I noticed 
> that the db that
> I'm wanting to connect to isn't started and the dbisql.exe 
> app must start it
> using the file location that I specify.
> Can I pass in the file location of the target db using 
> FreeTDS?  How would I
> get this working in a *nix environment?  I've got ODBC 
> connectors on the
> Win32 platform that are doing everything perfectly, but not 
> on my RedHat
> box.


I see the problem now.  On your Win32 box, the ODBC driver lets you specify the server's database filename.  How to do that with FreeTDS?  

AFAIK, the server_name field of the login packet is the only place to pass the database name to the server.  That field is limited to 30 characters.  A quick scan of src/tds/config.c leads me to suggest that:

	host = myserver.company.com
	port = 2638
	tds version = 5.0
	dump file = /tmp/tdsdump.txt

might work.  Obviously you'll need to quote such a name when you provide it to tsql.  You can't use ':' in the name because the config file reader trips on it.   But if database file is on the server's default drive, you can use a relative pathname, yes?  

That particular name is 27 characters.  If there's a way to pass longer names to the server (or, if that way doesn't work), I'd like to know what it is.  We'd need a wire trace to see what they're doing; "windump -s 1500 -w ODBC.trace host <hostname> and port <port> and tcp" would do fine.  

If that doesn't work (and your path <= 30 characters), please check the TDSDUMP log to make sure we're passing it correctly.  If we're not, post it here and we'll correct it.  Else we'll definitely need a trace.  



The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.
If you, as the intended recipient of this message, the purpose of which is to inform and update our clients, prospects and consultants of developments relating to our services and products, would not like to receive further e-mail correspondence from the sender, please "reply" to the sender indicating your wishes.  In the U.S.: 1345 Avenue of the Americas, New York, NY 10105.

More information about the FreeTDS mailing list