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)

Log DISK IO statistics per Database file!!!

By well0549,

Well, ever wanted to know what was happening on disk....

You could with FN_vitrualfilestats....

Here is a NICE SPROC that samples all databases and puts it in a table. You can choose if you want to Retain values in the table or that it must be cleaned every time the sproc runs.

( Put this data in a VBForm and you have a nice DISK
  activity monitor )

Well calling the SPROC like this : LOG_FILESTATS 0
Causes the SPROC to gather more and more date.
Every time you run the sproc the data will be inserted into the table.... ( Nice for analyzing data later..... )

Calling the SPROC like this : LOG_FILESTATS
Truncates the table so you wil get only one sample.
Combine this with A timer + GRID on a  VB form and
you have a nice activity monitor

This is a revisited version, int has been replaced with bigint. Not every server is rebooted every night.....

Total article views: 821 | Views in the last 30 days: 6
 
Related Articles
FORUM

Sproc calling Sproc

Question about calling a sproc from a sproc

FORUM

Reducing execution time of sproc

sproc contains lots of temp tables.

FORUM

Tunning Sproc for Web Application

Tunning Sproc for Web Application(Help required)

FORUM

Dropping and Recreating Sproc

drop and recreate sproc causes cpu spike and behaves odd unless i create a new spoc with different n...

FORUM

Dynamic Query/sproc

Create columns with dynamic Query/sproc

 
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