2

I'm attempting to restore a SQL Server 2012 .BAK file to my local server. I've successfully restored this .BAK file before. However now, when I try, I get the following error:

RESTORE detected an error on page (0:0) in database 'databasename' as read from the backup set.

Running the following command works:

RESTORE HEADERONLY FROM DISK = 'D:\database.bak'

However, running the following:

RESTORE VERIFYONLY FROM DISK = 'D:\database.bak'

Returns the following error:

Msg 3203, Level 16, State 1, Line 1
Read on "D:\database.bak" failed: 13(The data is invalid.)
Msg 3013, Level 16, State 1, Line 1
VERIFY DATABASE is terminating abnormally.

I downloaded the .BAK file from an FTP server again this morning and got the same error. I asked someone else with access to the same backup file and they can restore it with no issues at all. Any ideas?

Scott
  • 13,735
  • 20
  • 94
  • 152
  • They can restore the file you downloaded or they can download from the FTP and restore? My first guess is the file is currupt (via download hickup) and you should try to download and restore again. (yes again and mayby again after that if need be) – Steve Sep 23 '13 at 22:57
  • Re-downloading the .bak as binary fixed it in my case. Even though Filezilla says it's 'downloading binary mode', it might not be. There are a similar questions [here](http://serverfault.com/questions/541077/restore-detected-an-error-on-page-00-in-database-database-as-read-from-the) and [here](http://stackoverflow.com/questions/20544854/restore-detected-an-error-on-page-00). (http://serverfault.com/questions/541077/restore-detected-an-error-on-page-00-in-database-database-as-read-from-the) – RolfBly Dec 16 '14 at 19:36

4 Answers4

1

It is possible that you have a bad bak file or the source database is corrupted.

Verifiy the source database:

DBCC CHECKDB('DatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS on the server the backup was taken on.

Then try to backup it again and when copying the resulting bak, try to binary copy your file with other alternatives such as Robocopy, Copyfile, etc.

Junior Mayhé
  • 16,144
  • 26
  • 115
  • 161
0

All the solutions point out to a corrupt backup file that can NOT restore. What I did then was to go to the source SQL Database and run DBCC CHECKDB. Also it is good practice to check on "Verify Backup" when executing the backup.

Chagbert
  • 722
  • 7
  • 16
0

In SQL Server Restore Database, select backup file and click on Verify Backup Media.
If the backup file is corrupt, you will see error message.

user1579234
  • 501
  • 5
  • 15
0

Once a while we had the same error when downloading backup with Maxthon browser, after we download it with Windows RDP all start to work.