Solved

Restore sql database

Posted on 2011-03-14
14
292 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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

919 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

16 Experts available now in Live!

Get 1:1 Help Now