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

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

SQL Server Database File Sizes

By Jim P.,

This script creates a SQL_Statistics table in the Mater Database and then scroll through the existing databases on the server and gathers the Servers Name, logical device name, the file name and the file size and writes it to the table alond with a date time stamp.

We run it once a month to gather the growth rate on the databases. We then pull the data off multiple servers to write statistics reports.
The DB_Size returned is in 8KB Page Blocks. So Multiply by 8 to get KB then do the rest of the math againt 1024

Total article views: 512 | Views in the last 30 days: 2
 
Related Articles
FORUM

Server Database Backup

Server Database Backup

FORUM

connect Database server

connect Database server

FORUM

database mirroring monitor - remove server or database

database mirroring monitor - remove server or database

FORUM

Backup BizTalk Server Databases

Backup of BizTalk Server Databases

FORUM

Report Server Database Configuration

Report Server Database Configuration : Error

 
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