Home Forums Article Discussions Article Discussions by Author Discuss content posted by Sumit Agarwal Get IP Addresses of all Hostnames using SQL Server RE: Get IP Addresses of all Hostnames using SQL Server
aleksey donskoy
Mr or Mrs. 500
Points: 565
More actions
October 26, 2015 at 12:39 pm
#1835585
Found an easier way to do it. (Combined 2 scripts):
select distinct hostname, client_net_address from sysprocesses
inner join sys.dm_exec_connections ON sysprocesses.spid=sys.dm_exec_connections.session_id
where hostname <> ''
Alex Donskoy