Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to find out the source computer name if the hostname is blank Expand / Collapse
Author
Message
Posted Monday, November 23, 2009 6:10 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 3:45 AM
Points: 41, Visits: 459
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
Post #823212
Posted Monday, November 23, 2009 6:37 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 4:50 AM
Points: 1,949, Visits: 8,315
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
Kent user group
Post #823222
Posted Monday, November 23, 2009 7:15 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 3:45 AM
Points: 41, Visits: 459
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!

Post #823239
Posted Monday, November 23, 2009 7:23 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 4:50 AM
Points: 1,949, Visits: 8,315
Just guessing but maybe your server is not able to do reverse DNS lookups ?




Clear Sky SQL
My Blog
Kent user group
Post #823244
Posted Tuesday, November 24, 2009 3:17 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 3:45 AM
Points: 41, Visits: 459
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!

Post #823744
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse