Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 threshold alerts when the database (MDF, NDF &
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

3 Posts

Posted - 02/18/2013 :  12:54:12  Show Profile  Reply with Quote
HI Frnds,

I need help on setting up threshold alerts when the database (files MDF & LDF) reaching the MAX size.

I mean when the files are nearing max sizes. how to implement it.
If there is any good blog post, how to set up please forward it.

Please any help..! Thanks in Advance.

Posting Yak Master

160 Posts

Posted - 02/18/2013 :  18:05:39  Show Profile  Reply with Quote
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')
Go to Top of Page

Starting Member

3 Posts

Posted - 02/19/2013 :  12:44:36  Show Profile  Reply with Quote
Thanks Srimami.

I am that confident on creating my own.
Can one please help me providing some documention how to implement it.
Please share the links, If you have any.
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 02/19/2013 :  14:25:04  Show Profile  Reply with Quote
See if this article is useful for you?
Go to Top of Page

Starting Member

3 Posts

Posted - 02/19/2013 :  17:06:25  Show Profile  Reply with Quote
No James, It didn't help. anyway thanks!
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000