1

I am in need to shrink a data file in SQL Server 2012. I am using shrink files option in tasks of the database and am using "Reorganize pages before releasing unused space" option. SQL Server says minimum size I can shrink the file upto is 350000 MB. What will happen if I try and shrink it to 300000 MB, Will this delete the data from the database? In simple words, if I shrink the file beyond the minimum size of the file, does it delete the data from the file?

5

No, shrinking a file or a database never deletes data, at least not data that hasn't been marked to be deleted via the DELETE FROM or the TRUNCATE TABLE ... T-SQL statements.

The "Reorganize pages before releasing unused space" provides the facility to move data around within the file to allow shrinking the file as much as physically possible. If the minimum size reported by the "shrink file" dialog is 350,000 MB, then you won't be able to shrink the file to anything less than that number.

You may want to look at this question and the associated answers for more details about the pros-and-cons of shrinking databases/files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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