Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Operating system Error 112

By Mahidhar Vattem,

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

BACKUP LOG DatabaseName WITH TRUNCATE_ONLY;
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"'

Total article views: 4120 | Views in the last 30 days: 4
 
Related Articles
FORUM

Restore database from network drive

Restore database from network drive

FORUM

cluter server databases backup on local drive

cluter server databases backup on local drive

SCRIPT

Backup & Restoration Script

This script provides very useful information about database backup and restoration.

BLOG

Restoring databases to a set drive and directory

  Restoring databases to a set drive and directory Introduction Often people say that necessity i...

FORUM

Backup FileGroup and Restore on Secondary Database

Backup FileGroup and Restore on Secondary Database with same filegroups

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones