Quantcast
Channel: SQL Server Database Engine Forum
Viewing all articles
Browse latest Browse all 15872

Reclaim space from filegroup.

$
0
0

Hello,

Here is the scenario..

this is a datawarehouse with all historic and current data. The filegroups for 2011 and 2012 have data for respective years. The filegroups have unused space in each file within file group. There are 4 files in each file group and each file has around 25 gb unused space. that wastes around 100 gb per file group. I want to mark them readonly after reclaiming the space.

If I shrink the filegroups then unused space come close to 0%, but after a shrink there has to be a index rebuild. After rebuild the unused space gets added to 25 gb per file group. The indexes were rebuild with online = off and sort in tempdb option on. I even tried to use TRUNCATEONLY option of shrink filegroup that just truncates the free space at the end of the file. The unused space still remains.

Is there a way to get the space back while keeping the data de-fragmented?

Thanks!

Datta


Viewing all articles
Browse latest Browse all 15872

Trending Articles