Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restore SQL Server Database - failed: 38(Reached the end of the file.)

I am running the following script:

RESTORE DATABASE [Name_V2] FROM DISK = N'C:\20100920_Name_V2.bak' WITH MOVE N'Name_V2' TO N'C:\Program Files\...\Name_V2.mdf', MOVE N'Name_V2_log' TO N'C:\Program Files\...\Name_V2_log.ldf', REPLACE, STATS=1, FILE=1, NORECOVERY GO

When it runs, I get to 70 percent processed, and I get the following error:

Msg 3203, Level 16, State 1, Line 1
Read on "C:\20100920_Name_V2.bak" failed: 38(Reached the end of the file.)
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

I'm not sure what the problem is. Can someone shed some light on it? When I do a RESTORE VERIFYONLY on it, I get the same 'reached end of the file' error. When I do a RESTORE FILELISTONLY FROM DISK, it comes back with the results listing the .mdf and .ldf.

Thank you in advance!

like image 742
TexasT Avatar asked Apr 13 '11 22:04

TexasT


2 Answers

Looks like a corrupted or incomplete backup. See this post on msdn blogs http://social.msdn.microsoft.com/Forums/en/sqldisasterrecovery/thread/b57ae7c2-9f86-48e1-a356-ceb105181bf8

Summary of thread linked..

It appears that the backup file itself is corrupt, or the copy was incomplete.

Restore reached the end of the backup file before the database was fully restored.

like image 165
dnewcome Avatar answered Sep 22 '22 00:09

dnewcome


This issue is happening because you are using an incomplete backup file.

like image 38
RNair Avatar answered Sep 19 '22 00:09

RNair