question

hash avatar image
hash asked

CPU,I/O,Memory and # connections for a database

Hi, how to find the CPU,I/O,Memory and # connections for a database and compare it with the same entities at server level in order to find out which database is most resource intensive. Thanks in advance, hash
performanceserver
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
WilliamD avatar image
WilliamD answered
You didn't say what version, this will work on SQL 2005 and newer. This would give you the information on an instance level. I am not too sure where (or even if) you can find the info on a database level - anyone else? SELECT login_name, SUM(cpu_time) cpu_time, SUM(memory_usage) memory_usage, SUM(reads)+SUM(writes) io_usage, COUNT(*) connections FROM sys.dm_exec_sessions DES WHERE is_user_process=1 /* only user processes */ GROUP BY login_name
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.