Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
avipenina
Starting Member
44 Posts |
Posted - 2008-04-18 : 06:36:45
|
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 |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-04-19 : 17:55:58
|
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. |
|
|
avipenina
Starting Member
44 Posts |
Posted - 2008-04-19 : 18:50:12
|
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 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-04-19 : 19:54:52
|
You can get db file size from sys.database_files, and send db mail with msdb..sp_sent_dbmail. |
|
|
|
|
|