can I Shrink Data file

  • My one of PRD database size is 26 GB, Database is in simple recovery mode, but the data file unused space is around 7GB

    Can i Shrink data file to release the space.

    Regards,
    Shivrudra W

  • Are you facing issues with free space on the actual disk?

  • yes, only 1 GB free space available on drive now. and also there is no any free space drive to move the data file.

    Regards,
    Shivrudra W

  • I would first take a copy of the database, restore it to somewhere which has lots of space.

    Then shrink it, and rebuild all your indexes, as shrinking the data file causes high levels of fragmentation in the DB.

    That way you will see how much space after shrinking is actually needed to rebuild your indexes.

    So if you shrink 7GB, but rebuild of indexes adds 10GB back to the MDF file, then you wont be able to shrink it on your prod box.

    But I would first try and see if you can get more space assigned to your server before attempting any sort of shrinking operation.

  • Thanks, i will check it as per you suggestion.

    Regards,
    Shivrudra W

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

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