November 23, 2009 at 6:11 am
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
November 23, 2009 at 6:37 am
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 ?
November 23, 2009 at 7:15 am
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!
November 23, 2009 at 7:23 am
Just guessing but maybe your server is not able to do reverse DNS lookups ?
November 24, 2009 at 3:17 am
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