select hostname,count(*) hostconncount from master.dbo.sysprocesses group by hostname order by count(*) desc 小记之。