Sql-server – Trimming down a big SQL Server database

sql server

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?

enter image description here
enter image description here

Best Answer

Select the second radio button 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.