July 17, 2008 at 2:28 am
i want to know when the server is on at that moment how many users or clients are currently connected to the server and also what is the command to know the system ip addresss from sql server
July 17, 2008 at 2:48 am
You can use system procedure, it shows the information about login name, host name instead of IP address, also in which DB etc etc!
sp_who ( it has info what command )
sp_who2 ( more information what happened to your SQL Server)
July 17, 2008 at 4:32 am
Or you can use the newer DMVs
SELECT count(*) from sys.dm_exec_connections
You can also get the IP address fron the same dmv
SELECT login_name, HOST_NAME, client_net_address
FROM sys.dm_exec_connections c INNER JOIN sys.dm_exec_sessions s ON c.session_id = s.session_id
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 17, 2008 at 5:42 am
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply