Shrinking database data file in production environment is not a good idea. Due to Data file shrink, indexes will be badly fragmented and performance of the database will be degraded. Sometimes index rebuild also may not be helpful. Hence we are not recommending to shrink database data file.
steps to shrink :
- Take database full backup.
- Shrink data file (Shrink may happen or may not happen—not sure)
- Run-rebuild index
- Run update statistics
- Validate Database & application performance
Restore Database with last full backup (Step 1)
We would recommend to implement this activity in down time .
Note: We can’t estimate the time to shrink the data file and to run rebuild index over the database.