看SQL SERVER数据库当前连接数

select * from sysprocesses where dbid in (select dbid from sysdatabases where name='dbname')
原文地址:https://www.cnblogs.com/94cool/p/1725207.html