Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: 516 | 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