when you select the destination folder for SQL database restore as D:\dbs, you are prompted System.data.sqlclient.sqlerror:XXXXX to ask that it is compressed but not residing in a read-only database or filegroup. This file must be decompressed.
Check found that D disk has been set compression. SQL Server databases are not supported on NTFS or FAT compressed volumes. Compressed volumes cannot guarantee the write of sector alignment, but such writes are required in some cases to ensure transaction recovery. In addition, it is recommended that you do not back up the SQL Server database as a disk file on a compressed volume.
Workaround:
Right-click on the D:\dbs, select Advanced in the properties, cancel the folder's compression properties.
This article is from the "mabin1773" blog, make sure to keep this source http://107270.blog.51cto.com/97270/1563073
Disk settings compression causes the database to not be restored to the hard disk