Good try, but that only gives how many processes are connected to each and one database, not the number of unique users.SELECT db.name DbName, count(pro.loginame) Connections, count(distinct pro.loginame) UsersFROM master..sysdatabases as dbLEFT JOIN master..sysprocesses as pro ON pro.dbid = db.dbid and left(pro.sid, 2) in (0x0105, 0x0100) and pro.lastwaittype = 'networkio'GROUP BY db.name
Peter LarssonHelsingborg, Sweden