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 2005 Forums
 Transact-SQL (2005)
 alert if database it larger then xxxGB
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

avipenina
Starting Member

42 Posts

Posted - 04/18/2008 :  06:36:45  Show Profile  Reply with Quote
Hi,

i want to be alerted when any of my databases is more the xxxGB.

i know one method to do that and it is with the alerts in the SQL agent Performance condition ,but with this alert i needs to created alert monitor for every DB.

do you know a better way to achieve that ?
THX

Edited by - avipenina on 04/19/2008 10:23:25

rmiao
Flowing Fount of Yak Knowledge

USA
7266 Posts

Posted - 04/19/2008 :  17:55:58  Show Profile  Reply with Quote
Then you need write script to chaeck each db's size and send out mail if db size excess the limit, run the script as scheduled sql job.
Go to Top of Page

avipenina
Starting Member

42 Posts

Posted - 04/19/2008 :  18:50:12  Show Profile  Reply with Quote
quote:
Originally posted by rmiao

Then you need write script to chaeck each db's size and send out mail if db size excess the limit, run the script as scheduled sql job.



can you help with this script?
or point to to an existing script?

THX
Go to Top of Page

rmiao
Flowing Fount of Yak Knowledge

USA
7266 Posts

Posted - 04/19/2008 :  19:54:52  Show Profile  Reply with Quote
You can get db file size from sys.database_files, and send db mail with msdb..sp_sent_dbmail.
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.06 seconds. Powered By: Snitz Forums 2000