|
srimami
Posting Yak Master
152 Posts |
Posted - 02/18/2013 : 18:05:39
|
Run the following query to find out the database files size in MB. Create a maintenance plan as per your threshold (if the difference is less than 10%, set up an alarm).
SELECT @@SERVERNAME as ServerName, DB_NAME([database_id])AS [DBName], name, physical_name, type_desc, CONVERT( bigint, size/128.0) [SizeinMB], Convert( bigint, max_size/128.0) [MaxSize], Convert( bigint, Growth/128.0) [Growth], (Convert( bigint, max_size/128.0) - Convert( bigint, size/128.0) ) Difference FROM sys.master_files Where DB_NAME([database_id]) NOT IN ('master','tempdb','model','msdb','ReportServer','ReportServerTempDB') |
 |
|