The database cannot be made smaller than the minimum size of the database.The minimum size is the size specified when the database was originally created or set by using a file-size-changing operation.Have a look with below query
SELECT file_id, name, type_desc, physical_name, size, max_size
FROM sys.database_files ;
For details about current amount of free (unallocated) space in the database check this
Is it possible to shrink an MSSQL DB by say 10gb?
All these can be used to estimate how much GB DataBase can shrink.
- Minimum DB size
- Unallocated DB space
- Existing DB size and
- How much Percentage you would like to keep as free space
In case if I would like to keep 10% of free space
DBCC SHRINKDATABASE (UserDB, 10);
Check
DBCC SHRINKDATABASE for more details
Note:- shrinking Database is not advisable
Edit :
Even in case you really sure to shrink the database
the option for SHRINKFILE is better as it will shrink a single file while SHRINKDATABASE will shrink all the files in database and you may never need to shrink the entire database.
SHRINKFILE gives the option to set the output size of target file, below target DataFileName is set to shrink to a size of 8 MB.
DBCC SHRINKFILE (DataFileName, 8);
Check this link