Dear All, We have a database and archived some data, I want to shrink the database(I know it is not recommended) but I don't have choice. I will do rebuild index after that. I am shrinking the database but it is not releasing space to the disk, tried all the options. Please help me on this.
I am assuming your database is running in full recovery mode. I don't think the results you have posted are only for the MDF file. The Information displayed here can be gained by looking at the properties for the database. I recommend the following: The SHRINKDATABASE will try to shrink not only the MDF file but also the transaction log and that could be where your problem is. Run DBCC SQLPERF(LOGSPACE) and see whether or not there is a lot of free space in your log file. If so, run DBCC SHRINKFILE(2) and examine the free space again. If you see no change, try backing up the log first and try the shrink again.