Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


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


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

Author
Message
Jimmy M
Jimmy M
Valued Member
Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)

Group: General Forum Members
Points: 55 Visits: 562
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
Dave Ballantyne
Dave Ballantyne
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1818 Visits: 8370
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
Jimmy M
Jimmy M
Valued Member
Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)

Group: General Forum Members
Points: 55 Visits: 562
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!
Dave Ballantyne
Dave Ballantyne
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1818 Visits: 8370
Just guessing but maybe your server is not able to do reverse DNS lookups ?



Clear Sky SQL
My Blog
Jimmy M
Jimmy M
Valued Member
Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)

Group: General Forum Members
Points: 55 Visits: 562
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!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search