SQL Server – How to Reduce MDF File Size with 50 GB Reserved Space

sql serverssmst-sql

I have a DB with 50 GB of size I need to reduce the size of it.
How to reduce the file size of it?

I already did this: shrink | files | selected 'Data' as filetype.
but still it shows 50 GB Reserved space is using.

enter image description here

Best Answer

The actual syntax you want is:

USE [Savix_reporting] -- or whatever the actual name of the DB is
GO
DBCC SHRINKFILE (N'Savix_Reporting_Mis' , 5120mb)
GO

5120mb is a 5GB data file. Be advised, shrink the file could take 30 seconds, or 30 hours. There is no way to tell. e