Solved

Restore sql database

Posted on 2011-03-14
14
284 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
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
 

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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now