Operating system Error 112 in restore data base to a local desktop or to a FAT32 file system

Operating system Error 112

By Mahidhar Vattem, 2009/04/17

Total article views: 2531 | Views in the last 30 days: 2531
 

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"'

By Mahidhar Vattem, 2009/04/17

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值