July 9, 2013 at 1:52 pm
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
July 9, 2013 at 1:57 pm
the host is from where you are running this sp_who2. You can find it by select @@servernamee
July 9, 2013 at 2:03 pm
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
July 9, 2013 at 2:22 pm
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.
July 9, 2013 at 2:27 pm
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
July 9, 2013 at 2:45 pm
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
July 9, 2013 at 2:46 pm
They are related to system SPIDs. See the SPID column, all are less or equal to 50
July 9, 2013 at 2:56 pm
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
July 9, 2013 at 3:08 pm
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
July 9, 2013 at 3:17 pm
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