Sql-server – Error 3203 restoring SQL Server backup: The data is invalid

restoresql serversql-server-2008-r2sql-server-2012

I am trying to restore a .bak file (backup taken on SQL Server 2008 R2, compatibility level 100). I am restoring the backup on SQL Server 2012 edition. I get the below error. Unfortunately the original DB from where the DB was backed up is no longer available. I am new on this project. I was given the bak file on a thumb drive.

Any suggestions on how I can restore the DB to 2012 ?

Restore of database 'TstDB' failed.
System.Data.SqlClient.SqlError: Read on ***13(The data is invalid.)

This is all is the error message. When I run RESTORE VERIFYONLY, I get the below error:

Msg 3203, Level 16, State 1, Line 2
Read on "C:****" failed: 13(The data is invalid.)
Msg 3013, Level 16, State 1, Line 2
VERIFY DATABASE is terminating abnormally.

RESTORE HEADERONLY was successful. When I run restore database with stats=1 I get the below:

10 percent processed.
20 percent processed.
[…]
70 percent processed.
80 percent processed.
Msg 3203, Level 16, State 1, Line 2
Read on "C:\ccc.bak" failed: 13(The data is invalid.)
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.

Best Answer

Try running a RESTORE FILELISTONLY or RESTORE HEADERONLY. If these run successfully, that would prove that SQL Server is successfully accessing the .bak file. (And rule out some sort of permission issue.)

If that is successful, try running your RESTORE VERIFYONLY and RESTORE DATABASE with STATS=1. If it continues to fail in the same spot each time, it would probably indicate that your backup is corrupt, and you're out of luck.

If it fails in a different spot each time, it could be an issue with reliability of the location where your .bak is saved.