Need Script Determine File % Full

Last Post 04 Jan 2008 06:29 AM by SQLUSA. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
BMWGuy
New Member
New Member

--
04 Jan 2008 05:16 AM
Does anyone have a quick script to determine how full each file is as a percent?
SQLUSA
New Member
New Member

--
04 Jan 2008 06:29 AM
Try this:

DBCC showfilestats


Kalman Toth - Database, Data Warehouse & Business Intelligence Architect
SQLUSA: http://www.sqlusa.com/order2005highperformance/ The Best SQL Server 2005 Training in the World!


sqladmin
New Member
New Member

--
09 Jan 2008 06:16 AM
DBCC showfilestats only shows extents and associated data file.
SQLUSA
New Member
New Member

--
09 Jan 2008 08:06 AM
Fileid FileGroup TotalExtents UsedExtents Name FileName
1 1 80796 60598 AdventureWorks_Data C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf
3 2 160 2 DataFile1 f:\data\adventureworks\partition\datafile1.ndf
4 3 160 3 DataFile2 f:\data\adventureworks\partition\datafile2.ndf
5 4 160 3 DataFile3 f:\data\adventureworks\partition\datafile3.ndf
6 5 160 6 DataFile4 f:\data\adventureworks\partition\datafile4.ndf


FreeExtents = Total - Used

Kalman Toth - Database, Data Warehouse & Business Intelligence Architect
SQLUSA: http://www.sqlusa.com/order2005highperformance/ The Best SQL Server 2005 Training in the World!

You are not authorized to post a reply.

Acceptable Use Policy