Solved

Restore sql database

Posted on 2011-03-14
14
315 Views
Last Modified: 2012-06-21
Trying to restore sql server database using below syntex but I'm getting error

RESTORE DATABASE MyDatabase
   FROM DISK='D:\erase\MyDatabase.BAK'
   WITH MOVE 'MyDatabase_Data' TO 'd:\MSSQL\Data\MyDatabase_Data.MDF',
   MOVE 'MyDatabase_Log' TO 'd:\MSSQL\Data\MyDatabase_Log.LDF';
   GO

Error:

MODIFY FILE encountered operating system error 112(There is not enough space on the disk.) while attempting to expand the physical file
0
Comment
Question by:Bharat Guru
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35134940
The error implies that there is not enough space on the d: drive to perform the restore.
0
 
LVL 2

Expert Comment

by:swadhinray
ID: 35135407
The cause of the error message says lack of free disk space.
You need to free up disk space.
0
 
LVL 9

Expert Comment

by:kaminda
ID: 35135414
It seems there is no enough space to restore the database to D:\ drive, restore it to another drive by changing the file path or just free up D: drive.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:Bharat Guru
ID: 35138012
I have enough disk space
0
 

Author Comment

by:Bharat Guru
ID: 35138015
how can i restore only data wihtout log
0
 
LVL 13

Expert Comment

by:devlab2012
ID: 35138672
you cannot restore only data without log. But if you think your log file is too large, you can truncate it after restoring your database. The command used to truncate log file is:

Backup Log DBName with truncate_only

and then shrink your database to free up the space:

DBCC SHRINKDATABASE(DBName, TRUNCATEONLY)
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35138704
Run a full backup of the database and truncate the log, then perform a second backup and try restoring that.
0
 

Author Comment

by:Bharat Guru
ID: 35138826
How can I truncate from MyDatabase.BAK file,
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 125 total points
ID: 35138912
you can't you need to truncate the database before you produce the backup
0
 

Author Comment

by:Bharat Guru
ID: 35139531
some how restoring to 2008 worked
0
 
LVL 5

Expert Comment

by:VENKAT KOKULLA
ID: 35141889
This Issue is with space on the particular disk on which you are going to restore the database
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35793287
The comment chosen as the solution is not appropriate as it is not a solution.
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35805781
3) Accept one or more Expert posts as the answer. Comment http:#a35134940 was the first comment to explain the cause of the error.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question