Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2008
    Posts
    24

    Question Unanswered: Calculation of % of Disk Space

    I need to calculate percentage of free disk space available of the drive where SQL server is installed.

    I know the following command EXEC master..xp_fixeddrives gives free MB for different drives but i can't calculate the percentage and even i don't know in which drive SQL server is installed.

    I can't ask my customer to enable XP_CMDSHELL due to security reasons

    Please suggest me some solution.

    Thanks
    Kiran
    Last edited by kirandarisi; 05-19-09 at 16:18.

  2. #2
    Join Date
    Mar 2009
    Posts
    349
    open windows explorer. click on the drive and hit properties?

    or did you mean programatically?

    did you want set up an alert?

  3. #3
    Join Date
    Dec 2008
    Posts
    24
    Thanks for ur reply.

    I need to do it with SQL server no alert is needed

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Since the total diskspace is not likely to change over time, you can create a table somewhere, and insert the drives and sizes once. Use that to compare to the variable output of xp_fixeddrives.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •