Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
chih
Posting Yak Master
154 Posts |
Posted - 2007-08-02 : 22:50:12
|
| Hi everyone,We can use active monitor to see all connections to our db server.however, is there a query I can apply to see current number of connection for each db in overall?for example|db | coonection|master 100member 200Master..sysprocesses doesn't provide db_name |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-08-02 : 22:59:47
|
| Try this:select db_name(dbid) as db, count(dbid) as connection from sys.sysprocesses where dbid > 0 group by dbid |
 |
|
|
chih
Posting Yak Master
154 Posts |
Posted - 2007-08-03 : 00:10:23
|
Thank you very much!! quote: Originally posted by rmiao Try this:select db_name(dbid) as db, count(dbid) as connection from sys.sysprocesses where dbid > 0 group by dbid
|
 |
|
|
|
|
|