|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Thursday, January 17, 2013 3:20 AM
Points: 41,
Visits: 455
|
|
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
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 3:42 AM
Points: 1,943,
Visits: 8,228
|
|
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
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Thursday, January 17, 2013 3:20 AM
Points: 41,
Visits: 455
|
|
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!
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 3:42 AM
Points: 1,943,
Visits: 8,228
|
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Thursday, January 17, 2013 3:20 AM
Points: 41,
Visits: 455
|
|
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!
|
|
|
|