Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    101

    Unanswered: Total Drive space and Free space

    Hi,
    I'm looking for a query to get Total Drive space(all drives) and Free space(all drives) for a given server.

    I can get the Free space using xp_fixeddrives extended proc, but i'm not aware of any extended proc to get Total drive space.

    CREATE TABLE #fix
    (Drive NVARCHAR(5),
    MBFree INT)

    INSERT INTO #fix
    EXEC xp_fixeddrives

    SELECT * FROM #fix
    SELECT SUM(MBFree) AS SumMBFree FROM #fix


    This is what i'm trying to get.
    ServerName TotalSpace(sum of all drives) FreeSpace(sum of all drives)
    XXX 1.5 TB 400 GB

    Any input on this is greately apprceciated.

  2. #2
    Join Date
    Apr 2007
    Posts
    183

Posting Permissions

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