Hostname is a dot in sp_who2

  • Hi,

    Does anyone know what it means when one executes sp_who2, and some of the processes show a dot (.) for the host name but there is a login listed as well as other processing data (database name, command, CPU time, etc.)? I'm trying to figure out where that connection is coming from.

    Thanks for any help!

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • the host is from where you are running this sp_who2. You can find it by select @@servernamee

  • also, the bad news: keep in mind the hostname/workstation id as well as the Application Name can be configured to say anything in a connection string,

    so you cannot always rely on it being accurate;

    even SSMS allows you to fiddle with your connection string:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • That's funny, I never knew about such trick, thanks Lowell. But why Microsoft allows to change them at all? It can be really misleading.

  • SQL Guy 1 (7/9/2013)


    That's funny, I never knew about such trick, thanks Lowell. But why Microsoft allows to change them at all? It can be really misleading.

    it's a property of connection strings themselves, and not something microsoft really did or failed to do;

    since those parameters are optional, you can put anything in them, or let them get defaulted to the hostname/machine name and applciaiton names.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks, everyone, for the prompt replies.

    Just so I understand correctly, does a dot mean that the connection in question is being made from the current SQL Server itself? How would that happen? Another app running on the SQL Server? Or a linked server? The only reason I ask is that even when I check quickly via Profiler, the Application Name and Host Name fields are blank.

    And yes, neat trick regarding SSMS.

    Thanks again,

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • They are related to system SPIDs. See the SPID column, all are less or equal to 50

  • catchmekc (7/9/2013)


    They are related to system SPIDs. See the SPID column, all are less or equal to 50

    Thanks. Some of them are system SPIDs, but I see several where the SPID is greater than 100. And the logins and databases are ones we've created.

    Any other advice for tracking down the sources of these connections? My ultimate goal is to replace the logins with new ones, so I want to ensure I don't break anything by not knowing where a connection is coming from.

    Thanks again,

    webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • you can get the IP address for connections, if that helps;

    compare this to sp_who2, and see if it helps you any:

    select

    conns.client_net_address,

    conns.auth_scheme,

    sess.* from sys.dm_exec_sessions sess

    LEFT OUTER JOIN sys.dm_exec_connections conns on sess.session_id = conns.session_id

    exec sp_who2

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Lowell (7/9/2013)


    you can get the IP address for connections, if that helps;

    compare this to sp_who2, and see if it helps you any:

    select

    conns.client_net_address,

    conns.auth_scheme,

    sess.* from sys.dm_exec_sessions sess

    LEFT OUTER JOIN sys.dm_exec_connections conns on sess.session_id = conns.session_id

    exec sp_who2

    Thanks!!! That is what I had in mind.

    Very much appreciated.

    Sincerely,

    webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply