SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

ranzz
Starting Member

USA
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.

srimami
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

ranzz
Starting Member

USA
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

3742 Posts

Posted - 02/19/2013 :  14:25:04  Show Profile  Reply with Quote
See if this article is useful for you? http://www.mssqltips.com/sqlservertip/1523/how-to-setup-sql-server-alerts-and-email-operator-notifications/
Go to Top of Page

ranzz
Starting Member

USA
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  
 New 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.08 seconds. Powered By: Snitz Forums 2000