How to find out the source computer name if the hostname is blank

  • Hi all. One of our large SQL applications is pre-.Net (i am told "probably" written in C++) and uses an ODBC DSN to make connections to the sql server. The connection info held in sysprocesses for this application's connections does not contain a hostname (or application name)

    Is there any other way to get this info? Perhaps doing something with the net address?

    I am talking here about a sql 2005 server (although it was no different when we were still on 2000).

    I had a nasty blocking issue this morning and felt rather foolish saying that i could not tell where the rougue connection (which had held a transction open for nearly a day!) was coming from, although i could tell the developers "If you find the server then look in Tasdk Manager for client process ID x!". Through trial and error, this eventually worked.

    If anyone knows how I might find out the source computer for a connection which does not present hostname, i would be very grateful to hear from them.

    Many thanks,

    James

  • Is it the same in sys.dm_exec_sessions , though i cant imagine it would be different.

    How about sys.dm_exec_connections does that contain the correct ipaddresses ?



    Clear Sky SQL
    My Blog[/url]

  • Brilliant! dm_exec_sessions also does not hold the hostname but dm_exec_connections does indeed have the correct IP address. I had forgotten about this other DMV.

    Thanks so much - problem solved!

  • Just guessing but maybe your server is not able to do reverse DNS lookups ?



    Clear Sky SQL
    My Blog[/url]

  • I must admit i hadn't thought of it in that way. I always believed that connection layers and/or the code calling them had the choice of what to supply for certain info such as host and application, and therefore assumed the missing info originated from that area.

    In this case the server can do a reverse lookup.

    Thanks again for your help, really glad i asked!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply