Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In SQL, I'd know how many connection to database and What's IP of these connection?
Please help me
Posted
Comments
Thilina Chandima 30-Mar-12 4:21am    
please explain more about your problem.

Try:
SQL
EXEC sp_who
That will give you the hostname, you can then use that to access the IP: http://www.sqlserver2005.de/Articles/3/[^]
 
Share this answer
 
Get net_address, hostname from:
SQL
select net_address, hostname
from master.dbo.sysprocesses


Get client_net_address from:
SQL
SELECT client_net_address
FROM sys.dm_exec_connections


Please help me get net_address, hostname, client_net_address from 2 tables sysprocesses, dm_exec_connections
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900