possiblity to shrink the data file

  • Hi,

    when we needs to shrink the data file,

    is data size will reduce by it?

    any perfomance releted issue happen by shrinking

    Regards,
    Shivrudra W

  • I don't know if I understand correctly your question, but I'll try to give an answer. You can shrink the data file to give out the free space in it to the operating system. If you just decide to shrink the file releasing unused space, you will release empty data pages, if you decide to reorganize pages before shrinking, you will reduce the file size to the size shown in the "shrink file" dialog. This last options leads to massive logical fragmentation, so be careful what you do.

    -- Gianluca Sartori

  • Hey GianLuca,

    Really appreciate the way you replied. 🙂

  • read this ----> Stop Shrinking Your Database Files. Seriously. Now. (by Brent Ozar)[/url]

    --------------------------------------------------------------------------

  • Why do you want to shrink? Databases tend to grow as more data gets put in them. It's in their nature.

    Shrinking causes massive fragmentation and will just result in the data file growing again next time data gets added. When that happens, the entire system will slow down as the file is expanded. Also repeated shrinks and grows will cause fragmentation at the file-system level, which is hard to fix.

    See - http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply