Skip to Content.
Sympa Menu

freetds - Re: [freetds] SQSH2.1 compiles, but hangs & quits @ logon

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SQSH2.1 compiles, but hangs & quits @ logon
  • Date: Sun, 28 Dec 2003 12:18:15 -0500

On Sat, 27 Dec 2003 21:08:54 -0500, "Ron Creamer" <ron AT pageworks.com>
wrote:
> Lowden, James K wrote:
> > SQSH is written to Sybase's standard, not Microsoft's. I'm a little
> > surprised it even links to FreeTDS with msdblib enabled.
>
> I'm assuming from follow on posts that it should still work.

Yes.

Looking over your original post, I noticed it might be something simple.
You said:

> After compiling SQSH 2.1, and trying to run it with -H -U and -P
> parameters, it immediately displays the copyright notice, then hangs for
>
> 20 seconds and returns me to the shell prompt.

but you don't want -H, you want -S. -H sets the "hostname" i.e., the name
the client uses to identify itself to the server. If you're not using -S,
is DSQUERY set correctly?

> >>I applied a patch credited to Gentoo to the src/config.h file
> >>after my I ran configure:
> >
> >
> > This is a sqsh patch, right? I don't see how it could do any harm,
> > although you could probably do without it.
>
> Actually, without this patch, it fails to compile.

On my plate is making sqsh self-configure better. It needs autotool
maintenance. :-/

> > 1. Configure without --enable-msdblib.
> Exact same behavior (hangs)

Right. This option doesn't matter.

> > 2. Double check that sqsh is linking to the right FreeTDS (with ldd).
> >
> I believe it is. Here is the output of "ldd sqsh":
> libct.so.2 => /usr/lib/libct.so.2 (0x0030a000)
> libtds.so.3 => /usr/lib/libtds.so.3 (0x008de000)
> libdl.so.2 => /lib/libdl.so.2 (0x00bcb000)
> libm.so.6 => /lib/tls/libm.so.6 (0x00ba7000)
> libreadline.so.4 => /usr/lib/libreadline.so.4 (0x0481c000)
> libncurses.so.5 => /usr/lib/libncurses.so.5 (0x047da000)
> libc.so.6 => /lib/tls/libc.so.6 (0x00a6c000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00a54000)
> libgpm.so.1 => /usr/lib/libgpm.so.1 (0x00a48000)

Looks good. Did you export SYBASE=/usr ?

> > 3. Post a log, so we can see where it's giving up.
> Unfortunately, even with the log level at 99, no entries make it into
> the log. I feel it is a sqsh problem, it doesn't even seem to get to
> freetds.

Right again. That indicates the initialization routines were never
called.

> Do you have proper syntax to run gdb on
> a sqsh command line such as "sqsh -S sqlserver -U username -P password"?

>From memory:

$ gdb `command -v sqsh`
["command -v" yields an absolute path in a POSIX shell.]
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
...
(gdb) set args -S servername -U username -P password
(gdb) r
Starting program: /usr/local/bin/sqsh -S servername -U username -P
password
...
[you might receive a signal here. If so:]
(gdb) bt
[produces a backtrace]

If you get "program exited normally" without getting a log file, I'd say
the problem lies between Gentoo and sqsh.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page