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

I need more space in my development environment and need to shrink my database (or files) in SQL Server. Should I chose "shrink files" or "shrink database" to free most disk space?

Shrink options in SQL Server

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If the database contains more than one data file, with the "Shrink Files" options you can choose which file you want to shrink; "Shrink Database" will shrink all of them.

share|improve this answer
Thanks, just what I needed. Does this inclide LOG-files? – Benny Skogberg Nov 7 '12 at 9:59
Yes, but they will only be shrunk if there are inactive logs on them, i.e. if the DB is set to simple recovery model or if a transaction log backup has been performed. – Massimo Nov 7 '12 at 10:35

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.