SQLServerCentral Article

Operating system Error 112


This article describes "how to troubleshoot restoring a database to different server or to a local desktop or to a FAT32 file system."
When you try to restore a database, often times, you may receive the following error message in Query Analyzer or Managment Studio:

'Operating system error 112. There is not enough space on the disk while "RESTORE DATABASE"'

If the backup file is available, run "RESTORE FILELISTONLY from disk = 'file path'" in Management Studio or Query Analyzer. The output will show the size of database and transaction log files. The backup file is a .bak file, which is a SQL Server native backup file.

If .BAK file is big compared with the space free on your hard disk, run the following statements in SQL Server Management Studio or Query Analyzer to shrink data and log files

USE DatabaseName
DBCC SHRINKFILE ('DataFile1', 10) -- Change 'DataFile1' to 'DataFile2', if you two data files.
DBCC SHRINKFILE ('LogFile1', 10) -- similar to the above scenario.

After those commands are complete, backup the database one more time. After completing the backup, you shall be able to restore the database to smaller sized environments, assuming the above steps let you decrease the size of your database backup file.

If your file system is FAT32 (for example: external hard drives) and you wanted to restore a SQL Server backup file to this external hard drive, then follow these steps:

Note: Before converting FAT32 to NTFS, backup the files/folders.

Converting FAT32 to NTFS. The steps include:

  • Identify the disk/drive letter
  • Start -> Run ->Type: cmd
  • Type "convert drive letter: /fs:ntfs"
  • Enter Volume Label when prompted

Exit the command prompt window after you receive: Conversion complete

Now, run RESTORE operation in Management Studio or Query Analyzer.

Hope this helps in troubleshooting 'Operating System Error 112. There is not enough space on the disk while "RESTORE DATABASE"'


1.75 (32)




1.75 (32)