Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know the diff between shrink database or file? and what would the pros and cons? in what circumstances you wish to do either one?


share|improve this question

migrated from Sep 8 '10 at 14:57

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

Basically, DBCC SHRINKFILE shrinks one file, but DBCC SHRINKDATABASE shrinks all files. This is well documented in Books Online: see the entry for DBCC SHRINKDATABASE. The sections "How DBCC SHRINKDATABASE works" and "Best practices" should answer your questions.

share|improve this answer

As for some pros/cons, read this article from Paul Randal, and his advice against SHRINKDATABASE. Just throwing it out there for you.

share|improve this answer
nice article but not what i'm after – user53735 Sep 9 '10 at 0:54
btw.. is there a way to fix fragmentation after shrink the database? – user53735 Sep 9 '10 at 0:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.