Reduce MS SQL Size

Hi,

My MS SQL database has 27819.00 MB size with 19878.16 MB Space Available, by my calculation this means that the actual database size is 7940MB. How can i reduce the amount of diskspace that the database is using without loosing any data?

Thank you
garethtnashAsked:
Who is Participating?
 
pcelbaCommented:
Try DBCC command:
https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-shrinkdatabase-transact-sql
https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-shrinkfile-transact-sql

Of course, you should be ready for higher object fragmentation after you reduce the DB size. Empty space in the database allows better space optimization. This problem is described e.g. here: https://www.brentozar.com/archive/2017/12/whats-bad-shrinking-databases-dbcc-shrinkdatabase/
1
 
garethtnashAuthor Commented:
Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.