Bancos mais acessados na instância do SQL Server

Este script verifica os bancos mais acessados na instância do SQL Server.

SELECT

DB_NAME(mf.database_id) AS DatabaseName

,Mf.Type_desc AS FileType

,Mf.Physical_name AS Physical_Name

,LEFT(Mf.Physical_name,1) AS Driveletter

,num_of_reads AS READS

,num_of_bytes_read AS BytesRead

,num_of_writes AS Writes

,num_of_bytes_written AS BytesWritten

,size_on_disk_bytes/1024/1024 AS SIZE

FROM sys.dm_io_virtual_file_stats(NULL, NULL) AS fs

JOIN sys.master_files AS mf ON mf.database_id = fs.database_id

AND mf.FILE_ID = fs.FILE_ID

order by desc

Deixe um comentário

O seu endereço de e-mail não será publicado.