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?
How to Shrink MDF Files in SQL Server 2012
shrinksql serversql-server-2012
Related Question
- Sql-server – Can we shrink datafile of a database which is configured with log shipping
- Sql-server – Better Way of Releasing Massive Unused storage from Data Files to Server
- SQL Server Shrink – Does DBCC ShrinkDatabase Not Shrink Below Minimum Size?
- Sql-server – Release unused space in SQL Server database
Best Answer
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 theTRUNCATE 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.