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;
本文主要是介绍SQL server2005连接与进程,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
这篇关于SQL server2005连接与进程的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!