DBCC Shrinkfile not working

  • We have a 750Gb DB we would like to shrink. There is unused space in the file, we have ran thew DBCC shrink file command with the truncate only option. This reported as running successfully , however the file size is still the same.

    Any suggestions please?

  • SQL-JP (7/8/2011)


    We have a 750Gb DB we would like to shrink. There is unused space in the file, we have ran thew DBCC shrink file command with the truncate only option. This reported as running successfully , however the file size is still the same.

    Any suggestions please?

    Is your disk running out of space?

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

  • Truncate only will only work if the free space is at the end of the file. It probably isn't.

    How much free space are we talking here? How much does your DB grow per week?

    Are you low on disk space?

    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
  • 2.72GB left on drive

  • are you shrinking the .log file or one of the .mdf/.ndf files ?

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • sorry I mean 70GB unused space in the DB, we have also tried running DBCC shrinkfile and specifying a target size

    Trying to shrink MDF

  • 10% free space is not much. It's pretty much what the DB engine needs for normal operation. I suggest you rather consider moving that DB to a new drive, splitting it into files and moving some files to a new drive or getting more storage.

    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
  • I second that gail. If its production don't shrink it. Alter the db and point that to another drive.

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

Viewing 8 posts - 1 through 8 (of 8 total)

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