Shrinkfile or Shrink Database?? Quite a large DB !!

  • Hi All,

     

    I currently have a databse around 2 terrabytes in size, I dropped some tables in a filegroup but I the database hasn’t released the space to the OS, now I believe the only way to make the DB release the space is to do a shrink.

     

    The question is, which would be faster and more efficient.

     

    Doing a shrink database  to free up the whole db. And leaving a free space of say 1%

     

    Or shrinking the filegroup where I dropped tables, I tried both, but they seem to be quite slow. It was also blocking some stored procedure I had on the server.

     

    Running sp spaceused gives me:

     

    DB Size: 1912671.06 MB

    Unallocated space: 164521.21 MB      

     

    What are the restrictions on running a shrink job, is it better and would it be faster for nothing to be running on the server during the time of the shrink ?

     

    Also, are there any strategies that can be used to combat this problem

     


    Kindest Regards,

    John Burchel (Trainee Developer)

  • A couple of questions to ask yourself...

    Is the db size relatively static (9% unallocated is not that much if growth is anticipated)?

    Are the db's composed of multiple filegroups (i.e. one or more filegroups for data, one or more filegroups for indexes)?

    Are the filegroups composed of multiple files?

    Subdivision of VLDB's into smaller physical components makes management somewhat faster and more efficient albeit more complex.

    In answer to the 'when' question... It is always 'better' to perform db mgt on an inactive db - faster, safer and less prone to interfering activity.

    HTH,

    Art

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

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