找到活动的SQL连接,并杀掉它!【MSSQL】

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

select 
    db_name(dbid) as [Database Name], 
    count(dbid) as [No Of Connections],
    loginame as [Login Name]
from
    sys.sysprocesses
where 
    dbid > 0
group by 
    dbid, loginame