看SQL SERVER数据库当前连接数 select * from sysprocesses where dbid in (select dbid from sysdatabases where name='dbname')