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)
Thank this author by sharing:
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 :
db script for all storedprocedures,functions and tables for one time in database to the particular f...
looking for a way to recreate the database, and all it's schema scripted out (so when run it recreat...
glnp scripts on database
Generate scripts for all databases
Scripting out database rules to help you remove them from your database solutions.
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.