SQL Server查看当前连接
--查看当前连接数量SELECT * FROM master..sysperfinfo where object_name = 'SQLServer:General Statistics' And counter_name = 'User Connections'
?
--查看连接明细Use MasterSELECT c.session_id, c.connect_time,s.login_time, c.client_net_address,s.login_name,s.status FROM sys.dm_exec_connections c left join sys.dm_exec_sessions s on c.session_id = s.session_id
?
-- 关闭连接kill [session_id]kill 51
?