Skip to Content.
Sympa Menu

freetds - Re: [freetds] tsql connects but prompt incs 1, 2, 3

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] tsql connects but prompt incs 1, 2, 3
  • Date: Tue, 30 Nov 2010 21:48:27 -0500

Ryp Walters wrote:
>
> [root@XXX apps]# TDSVER=4.2 ./tsql -H XXX.XXX.XXX.XXX -p 1433 -U XXX
> locale is "en_US.UTF-8"
> locale charset is "UTF-8"
> Password:
> 1
> 2
> 3
> 4
> 5
> ....
>
> It pauses and accepts my password.
>
> I do not get the '1>' prompt. The prompt has no '>' and does not accept
> any commands. The prompt increments by one every second. I've tried
> compiling on three difference boxes with difference versions of redhat,
> but get the same result every time.

You might have found a bug in tsql. Perhaps someone else can confirm?

It seems when the options "-H -p" are used with tsql, it doesn't use the
specified port. Instead it asks the server for a port number (from port
1434). Here's an example failure using CVS HEAD:

$ TDSDUMP=dump tsql -H localhost -p99 -UU -PP || tail dump
locale is "C"
locale charset is "646"
15There was a problem connecting to the server
16net.c:1078:tds7_get_instance_port: timed out on try 9 of 16
net.c:1078:tds7_get_instance_port: timed out on try 10 of 16
net.c:1078:tds7_get_instance_port: timed out on try 11 of 16
net.c:1078:tds7_get_instance_port: timed out on try 12 of 16
net.c:1078:tds7_get_instance_port: timed out on try 13 of 16
net.c:1078:tds7_get_instance_port: timed out on try 14 of 16
net.c:1078:tds7_get_instance_port: timed out on try 15 of 16
net.c:1150:instance port is 0
login.c:434:invalid port number
mem.c:603:tds_free_all_results()

In your case, you're using tds 4.2 and tsql shouldn't even *attempt* to
look for a server instance. Depending on how you count, that's one or two
bugs.

Using -S instead of -H, or TDSPORT instead of -p, should both work fine,
however.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page