当前位置: 代码迷 >> SQL >> SQL Server查看现阶段连接
  详细解决方案

SQL Server查看现阶段连接

热度:97   发布时间:2016-05-05 11:51:54.0
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

?

  相关解决方案