你的位置:首页 > 数据库

[数据库]MSSQL查询连接数


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

select * from sysprocesses where dbid in (select dbid from sysdatabases where name='promoter')

SP_WHO 'sa'