0

I would like to create a job which sends an email alert when my server disk space goes beyond a specific threshold value.Since my data files are bigger there is very little free space on disk partitions.

Is is possible to write a Query which checks all the disks for the free disk space and give an email alert if the disk space goes below the set threshold value?

  • which edition of SQL server is there in your environment? – Md Haidar Ali Khan May 10 '17 at 13:01
  • @MdHaidarAliKhan, MS SQL 2008R2 standard edition with SP1 – l.lijith May 10 '17 at 13:02
  • ,I am not asking about version. what edition you are using ( like Enterprise,Standard, Express etc). – Md Haidar Ali Khan May 10 '17 at 13:04
1

Check out this article: Disk Space Monitoring: How To

And do not forget to monitor other crucial metrics: log file usage, cpu, blocking and so on...

1

Is is possible to write a Query which checks all the disks for the free disk space and give an email alert if the disk space goes below the set threshold value?

As per your question i have bifurcated into two parts.

Is is possible to write a Query which checks all the disks for the free disk space?

As per Pinal Dave Blog Here Through below mention TSQL query you can check your all disk drives space(in MB).

exec master..xp_fixeddrives;
Go

And give an email alert if the disk space goes below the set threshold value?

As per schneider Blog Here Through stored procedure with scheduler job you can get SQL Server Disk Space Monitor Alerts.

Note: - without testing in Test environment . Don't apply directly in Production environment.

Not the answer you're looking for? Browse other questions tagged or ask your own question.