Re: How to Compute Actual Space Used In Datafiles

From: Geoff N. Hiten (SRDBA_at_Careerbuilder.com)
Date: 05/06/04


Date: Thu, 6 May 2004 13:39:49 -0400

Yes. It has one huge glaring weakness. It does not look at space within a
filegroup. Knowing that a database has 70% free space is useless if I have
a filegroup that is full. With DBCCSHOWFILESTATS, I was able to aggregate
data usage within files and filegroups to get a meaningful space used/free
report.

-- 
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"WangKhar" <Wangkhar@yahoo.com> wrote in message
news:bb269444.0405060059.20b88b1e@posting.google.com...
> Have you looked at sp_spaceused ?
>
>
>
> "Geoff N. Hiten" <SRDBA@Careerbuilder.com> wrote in message
news:<u#PQovwMEHA.3944@tk2msftngp13.phx.gbl>...
> > Undocumented DBCC command 'DBCC SHOWFILESTATS' is what drives that
display.
> > You can build some really good stuff around that command.
> >
> > -- 
> > Geoff N. Hiten
> > Microsoft SQL Server MVP
> > Senior Database Administrator
> > Careerbuilder.com
> >
> >
> >
> > "Jack Snow" <mrbrew5510@hotmail.com> wrote in message
> > news:HAemc.146252$Gd3.35432608@news4.srv.hcvlny.cv.net...
> > > Has anyone discovered the algorithm and the appropriate system
> > > tables/columns to use to compute the actual amount of space
used/remaining
> > > within a database datafile?
> > > I'm trying to hit out to the values displayed in the "Taskpad" view in
> > > Enterprise Manager and want to write a routine around those values.
> > >
> > >


Relevant Pages

  • Re: How to add FILEGROUP?
    ... > I'm using SQL Server 2000 Standard Edition. ... SE support 32TB per database file, and sum of about 1,000,000 TB totally for the db. ... > If license issue, then how much SQL Server 2000 Standard Edition could cater ... > If filegroup, I had been created some which each one max size is 2GB? ...
    (microsoft.public.sqlserver.server)
  • Re: How to Compute Actual Space Used In Datafiles
    ... a filegroup that is full. ... Senior Database Administrator ... I support the Professional Association for SQL Server ... > "Geoff N. Hiten" wrote in message ...
    (microsoft.public.sqlserver.server)
  • Re: How to Compute Actual Space Used In Datafiles
    ... a filegroup that is full. ... Senior Database Administrator ... I support the Professional Association for SQL Server ... > "Geoff N. Hiten" wrote in message ...
    (microsoft.public.sqlserver.programming)
  • Re: Backup/restore
    ... is the primary file and that the filegroup is not the primary filegroup? ... DBCC SHRINKFILE (File1, EMPTYFILE) ... ALTER DATABASE MyDB ... Columnist, SQL Server Professional ...
    (microsoft.public.sqlserver.server)
  • Re: Creating Database (Urgently need help)
    ... Senior Database Administrator ... I support the Professional Association for SQL Server ... >>Geoff N. Hiten ... >>>>physical disk NOT in the list cannot be used for SQL ...
    (microsoft.public.sqlserver.clustering)

Loading