Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Ali Chadorbaf
Starting Member
44 Posts |
Posted - 2007-05-03 : 19:18:49
|
| Hi,Any function or so to get drive's capacity, drive's used volume, and drive’s free volume? |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
|
|
Ali Chadorbaf
Starting Member
44 Posts |
Posted - 2007-05-03 : 19:49:25
|
| That's very good. Tons of thanks.This covers most of my needs. It would be perfect if ,by any chance, there is another similar method to capture the drive's capacity too. Any? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-05-03 : 20:01:35
|
| You can derive that info with Performance Monitor counters.LogicalDisk:% Free SpaceLogicalDisk:Free MegabytesIf you know how much free space you have, what the % is, then you can derive the capacity via simple math.Performance Monitor counters can be called programmatically in .NET, therefore you can get to this information via a CLR function if you are using SQL Server 2005 (which you probably aren't given the forum you posted in).Tara Kizerhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
|
|
|