Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum Rss Feed

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
Free Newsletters:

News Via RSS Feed

Rss Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles


Posted Sep 20, 2005

Automatic Email Alerts for Low SQL Server Disk Space - Page 2

By Muthusamy Anantha Kumar aka The MAK

Parameters Explained

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

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

Step 4

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

Note: Please update all the above parameters according to your environment.

Fig 1.1

Fig 1.2

Fig 1.3


This 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

MS SQL Archives

Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM