How to compile SQSH with FreeTDS .60?

Jay Sauls jaysauls at hotmail.com
Mon Oct 7 17:27:59 EDT 2002


<Sorry to keep spamming everyone!>

out of desperation, I set

export FREETDSCONF=/usr/local/etc/freetds.conf

and ran:

[jays at jays-linux jays]$ sqsh -S jayssql -U corp\\jays
sqsh-2.1 Copyright (C) 1995-2001 Scott C. Gray
This is free software with ABSOLUTELY NO WARRANTY
For more information type '\warranty'
Password:
Msg 18452, Level 14, State 1

Login failed for user 'corp'. Reason: Not associated with a trusted SQL 
Server
connection.
Login incorrect.
[jays at jays-linux jays]

Here's what the tdsdumpconfig file looks like:

2002-10-07 16:23:17 Attempting to read conf files.
2002-10-07 16:23:17 Found conf file in  (from $FREETDSCONF). Reading section 
jayssql.
2002-10-07 16:23:17 Looking for section global.
2002-10-07 16:23:17 ... Found section global.
2002-10-07 16:23:17 Got a match.
2002-10-07 16:23:17 option = 'tds version' value = '4.2'.
2002-10-07 16:23:17 option = 'initial block size' value = '512'.
2002-10-07 16:23:17 option = 'swap broken dates' value = 'no'.
2002-10-07 16:23:17 no is a 'no/off/false'.
2002-10-07 16:23:17 option = 'swap broken money' value = 'no'.
2002-10-07 16:23:17 UNRECOGNIZED option 'swap broken money'...ignoring.
2002-10-07 16:23:17 option = 'try server login' value = 'yes'.
2002-10-07 16:23:17 yes is a 'yes/on/true'.
2002-10-07 16:23:17 option = 'try domain login' value = 'no'.
2002-10-07 16:23:17 no is a 'no/off/false'.
2002-10-07 16:23:17 option = 'cross domain login' value = 'no'.
2002-10-07 16:23:17 UNRECOGNIZED option 'cross domain login'...ignoring.
2002-10-07 16:23:17 ... Found section jdbc.
2002-10-07 16:23:17 ... Found section jayssql.
2002-10-07 16:23:17 Looking for section jayssql.
2002-10-07 16:23:17 ... Found section global.
2002-10-07 16:23:17 ... Found section jdbc.
2002-10-07 16:23:17 ... Found section jayssql.
2002-10-07 16:23:17 Got a match.
2002-10-07 16:23:17 option = 'host' value = 'jays.corp.digimine.com'.
2002-10-07 16:23:17 Found host entry jays.corp.digimine.com.
2002-10-07 16:23:17 IP addr is 172.17.1.50.
2002-10-07 16:23:17 option = 'port' value = '1433'.
2002-10-07 16:23:17 option = 'tds version' value = '8.0'.
2002-10-07 16:23:17 option = 'try domain login' value = 'yes'.
2002-10-07 16:23:17 yes is a 'yes/on/true'.
2002-10-07 16:23:17 option = 'nt domain' value = 'corp'.
2002-10-07 16:23:17 option = 'try server login' value = 'no'.
2002-10-07 16:23:17 no is a 'no/off/false'.
2002-10-07 16:23:17 option = 'dump file' value = 
'/home/jays/jays.tdsdump.txt'.
2002-10-07 16:23:17 option = 'debug level' value = '99'.
2002-10-07 16:23:17 ...Success.


As before , jays.tdsdump.txt doesn't show anything interesting, you just see 
the packet with the login error coming back from the server....
T
hanks to everyone for sticking with me on this....


>From: "Jay Sauls" <jaysauls at hotmail.com>
>Reply-To: "TDS Development Group" <freetds at franklin.oit.unc.edu>
>To: "TDS Development Group" <freetds at franklin.oit.unc.edu>
>Subject: [freetds] Re: How to compile SQSH with FreeTDS .60?
>Date: Mon, 7 Oct 2002 16:19:33 -0700
>
>The plot thickens....
>
>So just to be sure about which version of FreeTDS I was running, I did:
>
>su
>make uninstall
>
>in my freetds directory, then I grabbed the following:
>
>ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/freetds-current.tgz
>
>and did the standard tar xzvf into a newly created /home/jays/freetds
>directory, then did
>
>./configure --with-ssl
>make
>su
>make install
>
>Then, I went to my sqsh directory, and did:
>
>make
>su
>make install
>
>Then, I setup a TDSDUMPCONFIG file.  That's when the interesting stuff
>started to happen (note I changed the [jays] entry in freetds to
>[jayssql] to avoid confusion with the username):
>
>sqsh -S jayssql -U corp\\jays
>sqsh-2.1 Copyright (C) 1995-2001 Scott C. Gray
>This is free software with ABSOLUTELY NO WARRANTY
>For more information type '\warranty'
>Password:
>Segmentation Fault
>
>
>Here's what the tdsdumpconfig file looks like:
>2002-10-07 16:07:17 Attempting to read conf files.
>2002-10-07 16:07:17 Failed in reading conf file.  Trying interface
>files.
>2002-10-07 16:07:17 Looking for server....
>2002-10-07 16:07:17 Looking for server in /home/jays/.interfaces
>2002-10-07 16:07:17 Searching interfaces file /home/jays/.interfaces.
>2002-10-07 16:07:17 Couldn't open /home/jays/.interfaces.
>2002-10-07 16:07:17 Looking for server in /usr/local/interaces.
>2002-10-07 16:07:17 Searching interfaces file /usr/local/interfaces.
>2002-10-07 16:07:17 Couldn't open /usr/local/interfaces.
>2002-10-07 16:07:17 Setting 'tmp_port' to 1433 as a guess.
>
>
>So why is the conf file read failing?  I'd like to get ddd set up to
>step through this, but I don't know how to configure the whole thing to
>step through a library that's called by something else....   Note that
>the segmentation fault doesn't occur if there is no TDSDUMPCONFIG
>variable set....
>
>
>-----Original Message-----
>From: bounce-freetds-149810 at franklin.oit.unc.edu
>[mailto:bounce-freetds-149810 at franklin.oit.unc.edu] On Behalf Of James
>K. Lowden
>Sent: Monday, October 07, 2002 3:43 PM
>To: TDS Development Group
>Subject: [freetds] Re: How to compile SQSH with FreeTDS .60?
>
>On Mon, 7 Oct 2002 14:58:32 -0700, "Jay Sauls" <jaysauls at hotmail.com>
>wrote:
> > Oops!  Sorry, I misspoke:
> >
> > Using sqsh -S jays -U jays -I /home/jays/freetds.conf still gives:
> > "Server jays not found!"
> >
> > So it looks like sqsh isn't using the freetds.conf under any
> > circumstances?
>
>Jay,
>
>I sure hope you're enjoying this.  :)
>
>The application, be it sqsh or tsql, doesn't typically control which
>freetds.conf is used or how it's parsed (except tsql can bypass it, of
>course).  If tsql can connect to servername "jays", then libtds is on
>the
>job.
>
>As Steve said, sqsh's '-I' parameter is for an old-fashioned
>"interfaces"
>file format.  Rather than try to coerce sqsh into using the right file,
>I'd rather have sqsh rely entirely on FreeTDS to find and use the
>freetds.conf.
>
>If you're not sure sqsh is using the right file, set TDSDUMPCONFIG.
>FreeTDS will write a log file describing the source of the configuration
>it used.
>
>You can also test a standard login to Sybase's public server:
>
>	[tsql|sqsh] -S JDBC -U guest -P sybase
>
>as another way to isolate things.
>
>Steve mentioned 0.60.1.  Is that what you're using?  Just to double
>check.
>
>
>I'm a little puzzled.  As long as you're using the right version and
>sqsh
>is linked to it, you should have the same results Steve got.  It's too
>bad
>the prelogin logging doesn't show the login attempt.  That would make it
>crystal clear.
>
>If you're sure everything is spot on, then the next thing to do, I
>guess,
>is to send us tcpdump(1) output of the login attempt.  That's not my
>first
>choice and it won't be fun to look at, but it's bound to turn up
>something.
>
>Regards,
>
>--jkl
>
>---
>You are currently subscribed to freetds as: [jaysauls at hotmail.com]
>To unsubscribe, forward this message to
>$subst('Email.Unsub')
>
>---
>You are currently subscribed to freetds as: [jaysauls at hotmail.com]
>To unsubscribe, forward this message to 
>$subst('Email.Unsub')




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com




More information about the FreeTDS mailing list