How does SQL Server Determine the Hostname from a requesting machine

1,033 views
Skip to first unread message

thxmike

unread,
Sep 9, 2010, 3:27:14 PM9/9/10
to AtlantaMDF
I have been noticing in SQL Profiler and SP_WHO2 that the Hostname
column has an incorrect machine name from the requesting machine. In
fact the machines showing up as hostnames are no longer valid
machines.
I am trying to determine how SQL Server determines the Hostname from a
requesting machine.
Here are the things I have tried.

-Flush the DNS cache
-Restart the SQL Server
-Pinging the incorrect name to see if it resolves. It does not.
-Pinging the correct name to see if it resolved. It does.
-Running a net stat in the OS to determine the name it is using. It is
the correctname.

If anyone has any suggestions please let me know.

slava

unread,
Sep 10, 2010, 12:49:13 AM9/10/10
to AtlantaMDF
Check out etc\hosts file (just a wild guess)

Adam J. Wiedenhaefer

unread,
Sep 10, 2010, 9:07:33 AM9/10/10
to AtlantaMDF
You may want to look at the ADO connection string of the application
because I think there is a property where you can specify the name of
the PC. It will display in SQL Server as the wrong PC name. In those
cases I've looked at the MAC address and compared it to other
connections to determine the real name of the PC.

On Sep 9, 3:27 pm, thxmike <thxm...@hotmail.com> wrote:

Jonathan Kehayias

unread,
Sep 10, 2010, 9:52:07 AM9/10/10
to atlan...@googlegroups.com
Is this by any chance in relation to a Access frontend that connects to a SQL Backend?  There was a known issue in the past where Access stored the hostname that the frontend was built on, and misrepresented itself as coming from that host.  The other thing to check would be an incorrect WINS entry in the environment?

--
You received this message because you are subscribed to the Google Groups "AtlantaMDF" group.
To post to this group, send email to atlan...@googlegroups.com.
To unsubscribe from this group, send email to atlantamdf+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/atlantamdf?hl=en.


Jen Underwood

unread,
Sep 10, 2010, 10:19:23 AM9/10/10
to AtlantaMDF
This may be a stretch... it reminds me of something I saw a few years
ago when I virtualized many servers from physical environments to
VMs. We used a VMWare image of a generic install and part of the
process involved updating the new host name. If we did not update the
new host name in a few places, the generic image name host remained in
some places with SQL Server being one of them. Is it possible that
the old physical servers were P to V'd to a new virtual hostname and
that the new hostname was nut fully updated to all the various places
it may need to be updated in?

Jen

On Sep 10, 9:52 am, Jonathan Kehayias <jmkehay...@gmail.com> wrote:
> Is this by any chance in relation to a Access frontend that connects to a
> SQL Backend?  There was a known issue in the past where Access stored the
> hostname that the frontend was built on, and misrepresented itself as coming
> from that host.  The other thing to check would be an incorrect WINS entry
> in the environment?
>
> Jonathan Kehayias, MCITP
> jmkehay...@gmail.com
> SQL Server MVPhttp://sqlblog.com/blogs/jonathan_kehayias/http://twitter.com/sqlsarg
>
>
>
> On Thu, Sep 9, 2010 at 3:27 PM, thxmike <thxm...@hotmail.com> wrote:
> > I have been noticing in SQL Profiler and SP_WHO2 that the Hostname
> > column has an incorrect machine name from the requesting machine. In
> > fact the machines showing up as hostnames are no longer valid
> > machines.
> > I am trying to determine how SQL Server determines the Hostname from a
> > requesting machine.
> > Here are the things I have tried.
>
> > -Flush the DNS cache
> > -Restart the SQL Server
> > -Pinging the incorrect name to see if it resolves. It does not.
> > -Pinging the correct name to see if it resolved. It does.
> > -Running a net stat in the OS to determine the name it is using. It is
> > the correctname.
>
> > If anyone has any suggestions please let me know.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "AtlantaMDF" group.
> > To post to this group, send email to atlan...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > atlantamdf+...@googlegroups.com<atlantamdf%2Bunsubscribe@googlegrou­ps.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/atlantamdf?hl=en.- Hide quoted text -
>
> - Show quoted text -

thxmike

unread,
Sep 10, 2010, 5:49:18 PM9/10/10
to AtlantaMDF
I want to thank everyone for there valuable insight. With your help I
was able to determine that this problem is with Access.
Access stores the WSID (Workstation ID) in its connection string for a
linked table to SQL Servers.
This Access application was moved from machine to machine creating
what appears to be a bogus Host name in Traces and SP_WHO2 queries. We
reset the linked tables and this cleared the problem.

Thanks again for all your help

Reply all
Reply to author
Forward
0 new messages