Skip to Content.
Sympa Menu

freetds - Re: tdsping?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Brian Bruns" <camber AT ais.org>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: tdsping?
  • Date: Mon, 15 Jul 2002 13:08:09 -0400


> I found the ping for SQL 2000 in a Nessus script, mssql_ping.nasl. After
> doing some searches and converting the script to perl I could ping a SQL
> 2000 server and gets lots of good info. The Perl script is at another
> location. I will mail the link in the AM.

Thanks. It's somthing we need to support since MS is moving away from
fixed tcp port numbers.

> On the login technique... Where in the FreeTDS source could I find
> information on what data should be sent for a logon. I just want to
> interact with the protocol on any level versus the TCP connect. The login
> technique sounds good if there is no 'TDS ping' for SQL 7. Is there a
> server version query or anything like that, that does not require the login?

Unfortunately, I've never seen anything being able to be done before the
login packet is sent, so that's that. The version number comes back with
the login acknowledgement stream on a good login (however, service packs
do not increment the patch level field). You can look at the function
tds7_send_login() in src/tds/login.c for how to set up the login packet,
and also in doc/tds7.txt for some scribbling on what it all means.

Brian


> Thanks,
> Robb
>
>
>
>
>
>
>
> -----Original Message-----
> From: bounce-freetds-144897 AT franklin.metalab.unc.edu
> [mailto:bounce-freetds-144897 AT franklin.metalab.unc.edu]On Behalf Of
> Brian Bruns
> Sent: Monday, July 15, 2002 12:30 PM
> To: TDS Development Group
> Subject: [freetds] Re: tdsping?
>
>
> Sybase's ping utility (used to be dbping, then it was integrated into
> dsedit) just opens the tcp post and if it gets a clean connection
> succeeds, if it gets a timeout or connection refused then it fails. A
> technique I've used in the past is to send an invalid login to make sure
> what's on the other end is a functioning sql server. But, you may not want
> a bunch or bad logins showing up in your logs. ;-)
>
> You got any details on the udp thing for SQL 2000?
>
> Brian
>
> > Hi,
> >
> > I am hoping someone can point me in the right direction. I need to create
> a
> > utility to perform a protocol level ping for SQL Server 7 and 2000 in
> Perl.
> >
> > The SQL 2000 was no big deal because of the udp ping that can be used to
> > query the server on port 1434.
> >
> > However it does not appear that this is possible on SQL 7.
> >
> > I have been reviewing the source code for hints on where I could find a
> > 'ping' type of request that can be sent to SQL 7. Any ideas?
> >
> > I do need to do this in perl on the socket level and not using DBI.
> > (Constraints of the production environment.) So I guess what I really
> need
> > to understand is the protocol on a level where I can send a request to a
> > server and if I get something back that looks 'good' then I know all is
> well
> > with the server.
> >
> > Any pointers to places in the freetds code or docs where I can find this
> > info?
> >
> > Thanks,
> > Robb
>
> ---
> You are currently subscribed to freetds as: [rhill AT capitoladvantage.com]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')



  • tdsping?, Robb Hill, 07/15/2002
    • <Possible follow-up(s)>
    • Re: tdsping?, Brian Bruns, 07/15/2002
    • Re: tdsping?, Robb Hill, 07/15/2002
    • Re: tdsping?, Brian Bruns, 07/15/2002

Archive powered by MHonArc 2.6.24.

Top of Page