How to find drive space using MS SQL SQL

This is one of the query I used to see in forums. I think people are not aware of the inbuilt stored procedure we have in SQL to get the drive space.

Below stored procedure will give drive space details of your hard disk. Just open the query analyser and execute it.

EXECUTE master..xp_fixeddrives

The out put will be,

drive MB free
C 42566
D 37566

Normally people use this value to send alert to the database admin if the free space is below the minimum level.


Author: Jayendra Kumar13 Jan 2011 Member Level: Gold   Points : 0

thanks for sharing such a good information.

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: