March 25, 2003 at 7:57 pm
Is it possible to determine how much free space exists for a given data file?
I know SELECT FILEPROPERTY('file_name', 'SpaceUsed') will return how many pages are allocated but I want to know how many are used up.
Thanks in advance
Billy
March 26, 2003 at 1:56 am
Try DBCC CHECKALLOC ('<database_name>').
This gives details about every table in the database but does give the number of used pages and the number of reserved pages.
Jeremy
March 26, 2003 at 2:22 am
Alternatively you could use:
sp_spaceused
If you don't specify a table name it reports the space used by the database. You might need to run
sp_spaceused @updateusage = 'true'
to make sure it gives the correct answer.
Jeremy
March 26, 2003 at 3:11 am
Try this:
DBCC SHOWFILESTATS WITH TABLERESULTS
--
Chris Hedgate @ Apptus Technologies (http://www.apptus.se)
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply