I need a query to list all my disk drives, total disk capacity and free
space.. similar to what i would see in disk management.
I tried xp_fixeddrives and it just gives me the drives and free space, but
not total disk capacity
Thank youDidn't you post this and get an answer already? I know I answered this same
question posted by someone a couple of weeks ago. Anyway, here it goes
again:
If you're using SQL 2000, do one of the following:
#1) Write an XP that retrieves this information for you,
#2) Get a Windows version of the "df.exe" program and use xp_cmdshell to
call it, and parse the results. There are freely available versions on the
Web and I previously posted a link to one the last time I answered this
question.
If you're using SQL 2005 write a SQLCLR table-valued function or SP to
retrieve the info using .NET.
"Hassan" <Hassan@.hotmail.com> wrote in message
news:unYp%23lrOHHA.1252@.TK2MSFTNGP02.phx.gbl...
>I need a query to list all my disk drives, total disk capacity and free
>space.. similar to what i would see in disk management.
> I tried xp_fixeddrives and it just gives me the drives and free space, but
> not total disk capacity
> Thank you
>|||It has always been one of my wishes for xp_fixeddrives to return more
complete disk info. I typically do this outside of SQL Server with tools suc
h
as srvinfo.exe. I know this doesn't help if you want to insert the info into
a table.
Linchi
"Hassan" wrote:
> I need a query to list all my disk drives, total disk capacity and free
> space.. similar to what i would see in disk management.
> I tried xp_fixeddrives and it just gives me the drives and free space, but
> not total disk capacity
> Thank you
>
>
No comments:
Post a Comment