转载:当前网站的mssql数据库连接数

SELECT count(*) from master..sysprocesses where dbid=db_id('DC_DRP')


SELECT * FROM
[Master].[dbo].[SYSPROCESSES] WHERE [DBID]
IN
(
  SELECT
   [DBID]
  FROM
   [Master].[dbo].[SYSDATABASES]
  WHERE
   NAME='DC_DRP'
)

posted @ 2010-05-21 20:03  Leo Tin  阅读(232)  评论(0编辑  收藏  举报