SQL Server查询当前连接数

行数就是连接数,每一行是连接详情

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

你可能感兴趣的:(SQL Server查询当前连接数)