When the normal restore error:
Microsoft SQL-DMO(ODBC sqlstate:42000)
---------------------------
When trying to enlarge a physical file,MODIFY FILE experienced operating system error 112 ( There is not enough disk space.)
Failed to create one or more files. Please consider using with move option to identify a valid location.
Restore database The operation terminated abnormally. /span> but hard disk space is enough!
--------------------------------------------------------------------------------------------------------------- ------Workaround:If your restored database file is in a low disk space
You can use the following statement to query how many files are in the restored database, how large the files are, and where the files are placed on that disk after the restore
Restore FILELISTONLY from disk= ' C =Backup file name. Bak '
If you want to put the data file on a disk with enough space, use theMoveoption to change the location of the restored file,Example
Restore DatabaseLibrary nameFrom disk= ' C +Backup file name. Bak '
With Move 'Logical file name' To ' c:\aa.mdf '--The logical file name can be usedRestore Filelistonly query, c:\aa.mdf
If you're sure you have enough disk space, it could be a partition format problem, for fat32/16 partition format, which supports a maximum file size of 4g You can convert the partition format to ntfs To resolve
SQL Server Error "MODIFY file encountered operating system error 112 (insufficient disk space) when attempting to enlarge the physical files. )。 The process