When executing this script, it will create the stored procedure: usp_DiskSpaceAlert
Now you can create little jobs to check the available diskspace for 1 drive (so by adding more steps in the job, you can check all disks depending other parameters).
- MinMBFree = triggeramount of free disk space
- Drive = diskdrive to check
- RCPT = emailaddresses of recipients
EXEC dbo.usp_DiskSpaceAlert @MinMBFree= 3072, @Drive='C', @RCPTfirstname.lastname@example.org'
--> a more readable version is posted in the discussion: http://www.sqlservercentral.com/Forums/Topic1206274-3054-1.aspx
--> setting up database mail (SQL2005/2008): http://www.kodyaz.com/articles/sql2005-database-mail.aspx