Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favourite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved in your SSC briefcase from the favorites tab.
Download now (direct download link)

DATABASE I/O STATISTICS (SQL Server 2000)

By Mark Jones,

I had an interesting problem a few weeks back where the I/O performance stats for a SQL Server 2000 disks were jumping off the charts. The company I am currently working for does not have the infrastructure to dedicate sets of disks for every single Database and as such, a number of databases share the same physical raid array.

If you're a user of PerfMon (any DBA should have at some point), Physical I/O by disk falls short of being able pinpoint the problem areas as all I was able to ascertain was that Disk F (which has 20 + Db's) was busy. I needed to delve deeper and check which of these databases the culprit was.

As a result I came across a system function called ::fn_virtualfilestats. This function is able to return the I/O stats for a given database file since the SQL service was last started.

I added this function to sp_MSForEachDB and got my top 5 busiest databases based on I/O. This pinpointed the busiest DB's on the SQL server which, hey presto included the culprit causing the extremely high I/O.

Use the script below to provide a useful insight into the I/O requests and wait times of all your Server databases.

Script includes some simple reports detailing the TOP 5 busiest Databases based on:

For more information on the counters and result sets used in this script see :

http://msdn2.microsoft.com/en-us/library/ms187309.aspx


Total article views: 2162 | Views in the last 30 days: 4
 
Related Articles
FORUM

db script for all storedprocedures,functions and tables for one time in database

db script for all storedprocedures,functions and tables for one time in database to the particular f...

FORUM

script out a database (fully functional create script) ??

looking for a way to recreate the database, and all it's schema scripted out (so when run it recreat...

FORUM

I need script related to databases

glnp scripts on database

FORUM

Generate scripts for all databases

Generate scripts for all databases

ARTICLE

Those Stubborn Database Rules - Finding Them and Scripting Them

Scripting out database rules to help you remove them from your database solutions.

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones