Sunday, February 19, 2012

Capture I/O per Database

Hi,

Please help me how can i capture I/O operation per database SQLServer2005.

Regards

Sufian

Hi Mohd,

Are you trying to get information about how much IO is being performed per database file.

If yes, use the following:

select * from sys.dm_io_virtual_file_stats(<dbid>,NULL)

regards

Jag

|||

Hi Jag,

Thanks for ur prompt reply.

The value i am getting is too big .Is the value is total IO operations performed since database is in production..

How can i calculate the IO operations performed on the database in one day.

Regards

Mohd Sufian

|||

Hi Mohd.

These values from the last SQL Server Restart.

To capture the amount of IO for a day. Do the following:

1. Create a table.

2. Capture the sanpshot of values from the view (in my last post) and store in the table at the beginning of the day.

3. Capture the snapshot again at the end of the day.

4. Subtract the values captured in the beginning from the values captured in the evening and you will get the results.

Hope that helps.

regards

Jag

|||

hi Jag,

I did the same and it worked.

But to make it real time i captured the value for every minute and create a query to calculate the IO operation for an hour.

for each database.

Thanks a lot for ur help Jag.

Regards

Sufian

No comments:

Post a Comment