Monday, 21 April 2014

Query for Sql Server IO Utilization by each database



.......................................................................
Io Utilization by each databse in MB


.........................................................................

Note:Use of these queries are up to the  user  responsibilities,so i do not recommend to use these views without  testing on a test server,  as the impact of these views on system resources  can be intense at times, and i do not own these views  , the total credit goes to the individual contributors  and companies , the purpose of these posting  is to systematically bring different views at one place for troubleshooting sql server
.........................................................................
SELECT

    DB_NAME(database_id) AS [Database Name],

    CAST(SUM(num_of_bytes_read + num_of_bytes_written)/1048576 ASDECIMAL(12, 2)) AS io_in_mb

FROM

    sys.dm_io_virtual_file_stats(NULLNULLAS [DM_IO_STATS]

GROUP BY database_id;

The above query show  the io utilization by each database as shown below






No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Power BI Report Server

Power BI Report Server  is a new product which can be used to host both Power BI reports and SSRS reports. Currently beta version is ava...