An error is reported during normal restoration:
Microsoft SQL-DMO (ODBC sqlstate: 42000)
---------------------------
When trying to expand the physical file, modify file encountered an operating system error of 112 (insufficient disk space .).
One or more files cannot be created. Use the with move option to identify a valid location.
The Restore database operation is terminated abnormally.
However, the hard disk space is sufficient!
Solution:
If the disk space of the restored database file is insufficient
You can use the following statement to query the number of files in the restored database, and the size of these files. After restoration, the files will be placed on that disk.
Restore filelistonly from disk = 'C: \ backup file name. Bak'
If you want to put the data file on another disk with enough space, use the move option to change the location of the restored file.
Restore database name from disk = 'C: \ backup file name. Bak'
With move 'logical file name' to 'C: \ AA. MDF '-- the logical file name can be queried using restore filelistonly. c: \ AA. MDF is the location and file name after the logical file name is restored.
If you are sure that your disk space is sufficient, the partition format may be a problem. For FAT32/16 partition formats, they support a maximum file size of 4G/2G, you can convert the partition format to NTFS.