Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I check max disk space in SQL ?

Status
Not open for further replies.
Joined
Feb 14, 2002
Messages
1
Location
GB
Hi,

I'm using MSSQL Server 7 with a Windows NT4 server.
I want to monitor disk and database space, using SQL commands.
With xp_fixeddrives command I can see how much free space there is on each drive, but I also would like to get the max capacity of each drive. I cannot use sp_spaceused or sp_helpdb to do some space calculation (freespace + spaceused = totalspace) because these commands only check database size, and there are lots of files and programs installed on the computer and also using drive space.

Is there a SQL command to do this ? Thanks in advance.
 
Uhhh, it's your hardware, right? So how come you don't know how big the hard drives are? xp_fixeddrives ought to tell you when you're running out of space. You could do something clever and schedule it to run hourly and store the results in a table. You could then read that table in Excel and generate a graph showing you the rate at which your free space is being consumed.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top