RE: Help with shrinking a Sql Server file

RE: Help with shrinking a Sql Server file

 

  

It is not uncommon to have to run the shrinkfile command multiple times. The first pass will reorganize the pages to free up space at the end of the file, the second pass will actually release the space to the OS.

Try running the shrinkfile once with NOTRUNCATE to relocate the data pages, then running it again with TRUCNATEONLY, which will release the free space.

Kevin Martin
Database Engineer
Multimedia Games, Inc.



-----Original Message-----
From: m.medjamia [mailto:m.[Email Address Removed] Wednesday, April 28, 2004 1:33 PM
To: Kevin Martin; 'LazyDBA.com Discussion'
Subject: RE: Help with shrinking a SqlServer file


Hi Kevin,

Many Thanks for your answer,

The other drive only has the capacity to accommodate these two indexes
that I have already moved and only enough space is left for these
indexes to grow.

Therefore I will not be able to move any more indexes onto it.

When looking in enterprise manager for the space used by this file
index_file.ndf it shows clearly that there is 77 GB free space in the
file.

I assumed by running DBCC SHRINKFILE will reshuffle all the pages so
that they are contiguous and then it releases the available space at the
end.

Many Thanks for your help

Mehenna Medjamia


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.670 / Virus Database: 432 - Release Date: 4/27/2004

MS Sql Server LazyDBA home page