patternsqlModerate
Trimming down a big SQL Server database
Viewed 0 times
trimmingsqldatabasebigdownserver
Problem
I have a large SQL Server 2008 test database (1.9TB) and I want to reduced its size on the disk. I have been deleting unused tables, and purging significant amounts of data, but its size on disk it no reducing. What should I do?
I've looked at the Shrink task in SSMS, but the options are bewildering. Do I shrink the database or the files? And with what options?
I've looked at the Shrink task in SSMS, but the options are bewildering. Do I shrink the database or the files? And with what options?
Solution
Select the second radio button
I have found that using the DBCC commands for these work all the time, as the GUI did not work in some of my cases.
Also note, the extra space is there for a reason. You will need the space for future growth, but then that is a whole new topic in performance.
Reorganize pages before releasing unused space, and then in the Shrink file to: option, put the minimum MB specified. You will be corrected if you put a lower MB than that specified. Then click OK. I have found that using the DBCC commands for these work all the time, as the GUI did not work in some of my cases.
Also note, the extra space is there for a reason. You will need the space for future growth, but then that is a whole new topic in performance.
Context
StackExchange Database Administrators Q#3343, answer score: 10
Revisions (0)
No revisions yet.