SQL server2005连接与进程
select count(distinct net_address)-1 as 当前连接数 from master..sysprocesses;
select @@CONNECTIONS as 连接或试图连接数,@@MAX_CONNECTIONS as 允许的同时用户连接的最大数;
SELECT COUNT(*) AS 所有进程数 FROM master..sysprocesses;
SELECT cntr_value AS 用户进程数 FROM master..sysperfinfo as p
WHERE p.object_name = 'SQLServer:General Statistics' And p.counter_name = 'User Connections';
exec SP_WHO 'active' ;
SELECT * FROM master..sysprocesses;
select @@CONNECTIONS as 连接或试图连接数,@@MAX_CONNECTIONS as 允许的同时用户连接的最大数;
SELECT COUNT(*) AS 所有进程数 FROM master..sysprocesses;
SELECT cntr_value AS 用户进程数 FROM master..sysperfinfo as p
WHERE p.object_name = 'SQLServer:General Statistics' And p.counter_name = 'User Connections';
exec SP_WHO 'active' ;
SELECT * FROM master..sysprocesses;
关于作者:
王昕(QQ:475660)
在广州工作生活30余年。十多年开发经验,在Java、即时通讯、NoSQL、BPM、大数据等领域较有经验。
目前维护的开源产品:https://gitee.com/475660
目前维护的开源产品:https://gitee.com/475660