Operating system Error 112
By Mahidhar Vattem, 2009/04/17
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"'
本文介绍如何解决在不同服务器或本地桌面及FAT32文件系统上恢复数据库时遇到的“操作系统错误112:磁盘空间不足”问题。提供缩小数据文件和日志文件大小的方法,并指导如何将FAT32转换为NTFS。
3365

被折叠的 条评论
为什么被折叠?



