Sometimes when you try to restore database from MDF file you might get an issue like
"The file "F:\AdventureWorksDW2012\AdventureWorksDW2012_Data.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed."
The error is due to your MDF file is set to compressed mode, to resolve this issue please do the following steps below:
- Navigate to MDF file location
- Right click AdventureWorksDW2012_Data.mdf
- Right Click "Properties” >
- Click “Advanced...”
- Uncheck “Compress contents to save disk space”
- OK
Fig: Advanced Properties of MDF file
Hope it resolved your issue!