Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Find out freespace in a filegroup.

Author  Topic 

GreatInca
Posting Yak Master

102 Posts

Posted - 2002-04-19 : 18:49:43
I have 2 filegroups - one with core data and one with web tracking data. I need to know how much free space is in the core data filegroup because I think its getting full (it is the full size of the array currently so it can't grow). I can't find anything in books online on determining free space in files and/or filegroups. Anybody now how to find out or where to learn how?

GreatInca
Posting Yak Master

102 Posts

Posted - 2002-04-19 : 19:28:19
I figured it out (not sure if its the 'correct' way though).

DBCC ShrinkFile('Jobing_Data', TRUNCATEONLY, NOTRUNCATE)

TRUNCATE ONLY makes it not reaarange data and put locks on the DB and bring down the site

NO TRUNCATE makes it not to give up space to the operating system

both combined looks like it makes it do nothing but give you the result set output (of which you do currentsize-usedpages to get freepages).

Its not as simple if a filegroup had more than 1 file but my 2 filegroups do have only 1 file each (the write heavy tracking filegroup and the read heavy/some writes core data filegroup.

Go to Top of Page

VyasKN
SQL Server MVP & SQLTeam MVY

313 Posts

Posted - 2002-04-20 : 17:03:14
The undocumented DBCC SHOWFILESTATS might help!

--
HTH,
Vyas
Check out my SQL Server site @
http://vyaskn.tripod.com
Go to Top of Page

GreatInca
Posting Yak Master

102 Posts

Posted - 2002-04-21 : 15:28:36
Cool it works.

Go to Top of Page
   

- Advertisement -