Got invalid hostnames in the active window? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Got invalid hostnames in the active window?

I found the hostnames which the active window shows me were invalid.
For example,after I login SQL Server, I can find my pid in the active window,but the column "hostname" show me other computer’name.how do I do? Jelly.
Have you checked this on the server or from a client machine? Run SP_WHO2 for detailed information. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
What does the master..sysprocesses table show for the net_Address (MAC Address) of this ‘invalid hostname’ ? At least it can’t go wrong on that one. Strange, but this may be the only proof that ‘invalid hostnames’ are being reported. Otherwise, make sure that you are not also logged in on that other computer and/or somebody else is not using your credentials on that ‘other’ computer to access the SQL Server you are monitoring. Nathan H.O.
Moderator
SQL-Server-Performance.com
Hi satya and vbkenya,
Thanks for your help.
Following is the information what the active window shows me(sp_who and master..sysprocesses reports the same result.).
We can see there is just one Host who named "TANG" ,but the MAC were difference.
In fuct ,last time "TANG" login sql server with yysalary is two months ago.and the owner of "TANG"
had changed the computer name yet.I can’t find the computer who named "TANG" now.
—————————————————————-
SPID LoginName DB_Name Login Time Host MAC
—————————————————————-
103 yypersonnelManPower 2004/6/30 AM 10:35:24 TANG 009027E65479
110 yypersonnelManPower 2004/6/30 AM 10:35:24 TANG 009027E65479
113 yypersonnelManPower 2004/6/30 PM 02:28:01 TANG 00D0B7272225
119 yypersonnelManPower 2004/6/30 PM 03:19:46 TANG 009027E5E6D8
127 yypersonnelManPower 2004/6/30 PM 03:10:33 TANG 00D0B79A20AA
128 yypersonnelManPower 2004/6/30 PM 03:10:33 TANG 00D0B79A20AA
132 yypersonnelManPower 2004/6/30 PM 02:51:51 TANG 00D0B770BD11
133 yypersonnelManPower 2004/6/30 PM 03:19:47 TANG 009027E5E6D8
136 yypersonnelManPower 2004/6/30 PM 02:51:51 TANG 00D0B770BD11
140 yypersonnelManPower 2004/6/30 PM 03:00:27 TANG 0050BAFA2484
141 yypersonnelManPower 2004/6/30 PM 03:00:27 TANG 0050BAFA2484
75 yypersonnelManPower 2004/6/30 PM 02:28:01 TANG 00D0B7272225
123 yysalaryManPower 2004/6/30 PM 03:12:32 TANG 00D0B79A20AA
139 yysalaryManPower 2004/6/30 PM 03:15:44 TANG 009027E668B0
73 yysalaryManPower 2004/6/30 PM 03:07:51 TANG 009027E668B0
82 yysalaryManPower 2004/6/30 PM 12:58:59 TANG 00055D02B0CD
—————————————————————- Jelly.
I don’t suppose you have an Access application running on these computers do you? If you have that or an old VB application, many times people would put the HostName right in the connection string. It then wouldn’t matter where they connected from. It always showed the same thing. Have you identified what machines the MAC addresses belong to? MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
Yes it’s most likely the parameter "Application name=TANG" in the connectiong string. Many developer tools, for example Visual Studio will add this parameter. Remove it and you should see the real names.
I would beg to diifer slightly on the above. The "Application name=TANG" parameter in the connection string would show up in the "program_name" field and not the "hostname". The hostname is normally resolved from the MAC Address and IP address data using ARP and any available name resolution service DNS, WINS, NETBIOS broadcasts,hosts file, LMHosts file etc. 1. Check your local Hosts file (C:WINNTSystem32Driversetc)
2. Check your DNS server for all host (A) records pointing to ‘TANG’ — Here lies the dragon most of the time. You may be forced to manually cleanup the DNS zone data.
3. Check your WINS server if you have any.
Once again, this is a definitely a NETWORKING problem. Forget SQL Server. Nathan H.O.
Moderator
SQL-Server-Performance.com
It is a networking problem Nathan. However, I’m telling you I see this ALL the time. People hardcode the hostname in the connection string and then you can’t tell where it’s coming from. This isn’t a guess. I’m the DBA for a shop with 27 database servers that handle all kinds of applications. This has made tracking things down sometimes a nightmare. ODBC;DSN=Tester;WSID=TANG;APP=TANG;DATABASE=Northwind;Trusted_Connection=Yes If you have this hardcoded in "anywhere" in your environment, it doesn’t make a difference in the world where it’s running from or what application it’s running. It wil show HostName = TANG and ApplicationName = TANG in the Profiler and traces. MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
Many thanks all friends.
Connection string of the applictions doesn’t point one hostname,they use IP address.So i think that is not connection string makes this problem.
I checked the local host file and DNS server,I didn’t find any problem,but the WINS server doesn’t be set and I have set it just now.
It’s the time for get off duty to Chinese people.So I have to get the test result at tomorrow. Thanks all the enthusiastic person !
Jelly.
Yea I meant WSID=Tang and not Application name=Tang
quote:Originally posted by Jelly0228
Connection string of the applictions doesn’t point one hostname,they use IP address.So i think that is not connection string makes this problem.
It’s not the server name or IP where talking about here but additional parameters like WSID in the connection string. These parameters will control what hostname you see in the "Current Activity" window etc.
Oh,I am so sorry for my poor english.I know I didn’t express my problem clear.<br />The machine "TANG" was a client computer about two months ago.Now it’s not exists at our LAN: the owner changed its name.<br />the field "HostName" of the active window also shows some other hostnames,but they are just like "TANG"<img src=’/community/emoticons/emotion-7.gif’ alt=’:s’ />ame hostname,different MAC address.<br />Except SQL Server host ,all the MAC comes from application users.<br /><br />Now I still get the invalid hostname.<br /><br /><br /><br /><br />Jelly.
Could you find the connectionstring being used in the applications that have this problem and post them here (remove passwords and IPs).<br /><br />As mentioned visual studio and other tools will generate connectionstrings like this:<br /><pre>DRIVER={SQL Server};SERVER=MySQLServer;UID=sa<img src=’/community/emoticons/emotion-4.gif’ alt=’;P’ />WD=1234;APP=Microsoft (R) Developer Studio;WSID=TANG"</pre>Even if you move the application to another computer or rename the computer that the application runs on the hostname it identifies it with will still be TANG since WSID=TANG is in the connectionstring.<br /><br /><br /><br />
Yes, The WSID (with ODBC) or ‘Workstation ID’ (with OLEDB) connectionstring parameters can cause such a problem. Just to get a clearer picture of your situation: 1. Are the ‘invalid hostnames’ being generated by the connections to the SAME database by the SAME client application? If yes, how does this application connect to the server? Some code please…. OR 2. Does this ‘behavour’ manifest itself EVEN IF you connect to the SQL Server from Enterprise Manager and Query Analyzer?
Nathan H.O.
Moderator
SQL-Server-Performance.com
We develop the applictions with Delphi,and the engine is ADO,there is the connctionstring:<br />Provider=SQLOLEDB.1<img src=’/community/emoticons/emotion-4.gif’ alt=’;P’ />assword=1234<img src=’/community/emoticons/emotion-4.gif’ alt=’;P’ />ersist Security Info=True;User ID=yysalary;Initial Catalog=ManPower;Data Source=172.17.9.7.<br /><br />As you see,the server’s IP is "172.17.9.7",its computer name and database are "ManPower",I think <br /><br />it doesn’t point to any WSID or ‘Workstation ID’,right?<br /><br />1. Are the ‘invalid hostnames’ being generated by the connections to the SAME database by the <br /><br />SAME client application?<br /> Yes,except I use Query Analyzer or Enterprise Manager to connect sql server.<br /><br /><br />Jelly.
]]>