I restored a db with a .bak of the production db, on the development environment. Then I truncated a few, big tables so the space used became the half, but the datafile size obviously is now the same. Usually I shrink the datafile and then set the initial size to value slightly bigger than the used space. This time it seems I cannot do both things. I tried to increase the size and it works, but when I shrink it returns to the previous size I upgraded from. What can I do?
Asked
Active
Viewed 23 times
0
-
What database server are you using? What scripts are you using to do the backup, shrink, restore operations? – TZHX Oct 26 '15 at 15:10
-
I'm using SQL Server 2014. I'm using the GUI (db->tasks->shrink->files) – maurice Oct 26 '15 at 15:15
-
I would clarify that it happens only shrinking one of the two datafiles composing the filegroup. The other one shrinks without problems and the file reduces in size. – maurice Oct 26 '15 at 15:37