MSSQLCity.Com - All about MS SQL
     
About Us  
SSWUG Articles  
Articles  
FAQ  
Administration  
Backup/Restore  
Connectivity  
Development  
General  
Installation  
OLAP  
Replication  
Transfer/move  
Trouble  
SQL 6.5  
Scripts  
Tips  
Test Exams  
Advertise  
Download  
History  
Search  
Traffic  
Related Links  
     
Your button logo
Add to Favorites
 
     
 


How can I return from within a T-SQL the list of server's hard drives?

Answer:

You can use the xp_fixeddrives undocumented extended stored procedure to return the list of all hard drives and the amount of free space in Mb for each hard drive. This extended stored procedure does not require any parameters.

This is the example to run:

EXEC master..xp_fixeddrives

See this article to get more information about the useful undocumented extended stored procedures:
Useful undocumented extended stored procedures


 

 
Visit The SQL Server Worldwide User's Group for all the latest news and information about SQL Server, Oracle, DB2 and XML for developers and administrators.

(c) 1997, 2005 Bits on the Wire, Inc