Skip to Content.
Sympa Menu

freetds - Re: [freetds] Fwd: Named Instances

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] Fwd: Named Instances
  • Date: Wed, 9 Jan 2008 17:24:35 -0500

> I've done some more sleuthing. I've found that ports 1433 and 1197 are
> open, however, 1434 is not. I can telnet into 1197 and 1434 and the IT
> department confirmed that as far as they know, everything is open and
> ready to go.

OK, you can telnet to the port. And you can tsql to it too, right?

$ tsql -S ...

works?

Once tsql connects and works normally, you've solved any network and
freetds.conf issues.

> I am able to connect normally using php_mssql.dll, but php_dblib.dll is
> giving me these issues.

[Paging Dr. Kromann...]

The fact that one works and the other not -- with the same script? --
puzzles me. It does sound like something about your php_dblib.dll.

> Is there something specific I should be looking for in my dump files?

You know how to look for the instance port in the instance info packet.
You should see the connection being made to that port next, something
like:

net.c:288:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
login.c:734:quietly sending TDS 7+ login packet
token.c:312:tds_process_login_tokens()
net.c:547:Received header

Different versions of FreeTDS will have different log files and I don't
remember how much detail would be in yours. The above is from a recent
build.

Once the connection is accepted, the server will either accept or reject
the login. If you see all that happen with your "good" session and not
with your "bad" one, and they're both using the same host and port, then I
don't know what to tell you. :-(

HTH.

--jkl

> On 12/19/07, James K. Lowden <jklowden AT freetds.org> wrote:
> > Patrick Corbett wrote:
> > > net.c:836:instance info
> > > 0000 ... |.l.Serve rName;AB|
> > > 0010 ... |C;Instan ceName;d|
> > > 0020 ... |ef;IsClu stered;N|
> > > 0030 ... |o;Versio n;8.00.1|
> > > 0040 ... |94;tcp;1 197;np;\|
> > > 0050 ... |\ABC\pip e\MSSQL$|
> > > 0060 ... |DEF\sql\ query;;|
> >
> > That is the server's response. That's good! It tells us you
> > connected to the address, found the rendevous port (1434), and got a
> > reply: to connect to the "BOR" instance at port 1197.
> >
> > Then you couldn't connect, as though no one was listening at 1197.
> >
> > I suspect a firewall is blocking you. Perhaps they opened 1434 (and
> > maybe 1433, the default), but are blocking most others, including
> > 1197. You could prove it with a tcpdump trace (you can use windump),
> > but it would be better if your network folks worked with you to make
> > sure your packets are getting through.
> >
> > In any case, your freetds.conf is now right or almost right. I don't
> > know
> >
> > if they want you to use the internal or external address, but as long
> > as you're getting a packet like the one above, you've described the
> > server correctly to FreeTDS.




Archive powered by MHonArc 2.6.24.

Top of Page