HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlModerate

How do you see which database on a Server uses most resources

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
youserverseeusesdatabasehowwhichresourcesmost

Problem

I have a database server with a couple of databases on it. How can I see where any resource pressure may come from?

I would like to get a table of:

  • Database Name



  • Batch Requests per second



  • CPU Time



  • Logical Read



  • Logical Writes

Solution

Only some resources can be tracked to databases. IO and buffer pool usage can clearly be tracked to a database:

  • IO usage: sys.dm_io_virtual_file_stats



  • Buffer pool usage: sys.dm_os_buffer_descriptors



The query execution statistics (like logical reads) can be attributed to queries, but cannot be associated (correctly) with a database because queries can (and often do) span databases. sys.dm_exec_query_stats is the main entry point for these stats.

Context

StackExchange Database Administrators Q#50899, answer score: 11

Revisions (0)

No revisions yet.