@out is the output variable for the procedure usp_diskspace
@From is the "From" address.
@To is the "To" address.
@Subject is the Subject of the email.
@minimumspace is the minimum amount of hard disk space needed in
@SMTPServer is the SMTP Server name on your network.
Note: Please update all the above parameters according
to your environment.
the above code is executed in Query Analyzer, the usp_diskspace collects
information from your hard disk drive and sends an email using usp_send_cdosysemail
if any of the drives are running out of space when compared the minimum space
requirement. Refer Fig 1.0.
a Scheduled job, to be executed every hour, to execute the code from step 3.
Refer Fig 1.1, Fig 1.2 and Fig 1.3.
Please update all the above parameters according to your environment.
article has illustrated how to set up email notification when SQL Server is
running out of Hard Disk Space.
See All Articles by Columnist MAK