?
Solved

Restore sql database

Posted on 2011-03-14
14
Medium Priority
?
344 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
13 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public 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 500 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

829 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