监控数据库的连接数select COUNT( * ) from master.dbo.sysprocesses select COUNT( * ) from master.dbo.sysprocesses where dbid=DB_ID('WKOMS') and hostname='OMS-APP' select COUNT( * ) from master.dbo.sysprocesses where dbid=DB_ID('WKOMS') and hostname<>'OMS-APP'…
查看数据库登录名信息 use mastergoSELECT name AS LoginName , dbname AS DefaultDB , createdate AS CreateDate, updatedate AS UpdateDate, language AS Language , THEN 'NT USER' ELSE 'SQL USER' END AS UserType FROM syslogins; 查看数据库用户信息 SELECT * FROM sysusers; 查看用户…