I'm not a DBA but I need to shrink a DB, I tried using the SSMS interface to shrink and it didn't work.
The stats are as follows:
I have also tried the DBCC SHRINKDATABASE ... TRUNCATEONLY
command and didn't change anything either.
How can I shrink this DB (free up the unused space to the OS) without losing data?
By the way also check the initial size. If your initial size is 235,013 MB then you need to reduce your initial size first.
Secondly, shrinking is one of the worst things your could do to a data file. If you shrink a tlog file its okay, because tlogs dont use the data page structure. If you shrink your database data file, you can make a perfectly de-fragmented database into a perfectly fragmented database. It will mess the performance beyond recognition. Why do you want to shrink by the way? The db is 200 something GB and has 60 something free.... that's like around 30% free. Don't you think in the matter of some time, that space can be utilized?
If you still need to shrink the db, you can create a file group and move the data to that file group and delete the current file group or in case of primary file group you can reduce the size to the bare minimum.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With